New upstream snapshot.
Debian Janitor
1 year, 2 months ago
0 | 0 |
---
|
1 | |
Checks: 'clang-diagnostic-*,clang-analyzer-*,readability-*,modernize-*,bugprone-*,misc-*,-misc-unused-parameters,google-runtime-int,-llvm-header-guard,fuchsia-restrict-system-includes,-clang-analyzer-valist.Uninitialized,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-alpha.*,-readability-magic-numbers,-readability-braces-around-statements,-readability-function-cognitive-complexity,-readability-isolate-declaration,-bugprone-easily-swappable-parameters'
|
|
1 |
Checks: 'clang-diagnostic-*,clang-analyzer-*,readability-*,modernize-*,bugprone-*,misc-*,-misc-unused-parameters,google-runtime-int,-llvm-header-guard,fuchsia-restrict-system-includes,-clang-analyzer-valist.Uninitialized,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-alpha.*,-readability-magic-numbers,-readability-braces-around-statements,-readability-function-cognitive-complexity,-readability-isolate-declaration,-readability-identifier-length,-bugprone-easily-swappable-parameters,-modernize-macro-to-enum'
|
2 | 2 |
WarningsAsErrors: '*'
|
3 | 3 |
HeaderFilterRegex: '.*(?<!lookup3.c)$'
|
4 | 4 |
FormatStyle: 'file'
|
0 | |
name: ci
|
1 | |
|
2 | |
on:
|
3 | |
push:
|
4 | |
branches: [master]
|
5 | |
pull_request:
|
6 | |
branches: [master]
|
7 | |
|
8 | |
jobs:
|
9 | |
macOS-gcc:
|
10 | |
runs-on: macOS-latest
|
11 | |
steps:
|
12 | |
- uses: actions/checkout@v2
|
13 | |
- name: Compile with gcc
|
14 | |
env:
|
15 | |
CC: gcc
|
16 | |
run: |
|
17 | |
brew upgrade python
|
18 | |
pip3 install logilab-common
|
19 | |
pip3 install pytest
|
20 | |
make clean
|
21 | |
make
|
22 | |
pytest ./test.py
|
23 | |
make clean
|
24 | |
macOS-clang:
|
25 | |
runs-on: macOS-latest
|
26 | |
steps:
|
27 | |
- uses: actions/checkout@v2
|
28 | |
- name: Compile with clang
|
29 | |
env:
|
30 | |
CC: clang
|
31 | |
run: |
|
32 | |
brew update
|
33 | |
brew upgrade python
|
34 | |
pip3 install logilab-common
|
35 | |
pip3 install pytest
|
36 | |
brew install llvm
|
37 | |
export PATH="/usr/local/opt/llvm/bin:$PATH"
|
38 | |
make clean
|
39 | |
make
|
40 | |
pytest ./test.py
|
41 | |
make clean
|
42 | |
clang-tidy **/*.h **/*.c -- -Iinc
|
0 | |
name: 'Lock threads'
|
1 | |
|
2 | |
on:
|
3 | |
schedule:
|
4 | |
- cron: '0 0 * * *'
|
5 | |
|
6 | |
jobs:
|
7 | |
lock:
|
8 | |
runs-on: ubuntu-latest
|
9 | |
steps:
|
10 | |
- uses: dessant/lock-threads@v2
|
11 | |
with:
|
12 | |
github-token: ${{ github.token }}
|
13 | |
issue-lock-inactive-days: '30'
|
14 | |
issue-lock-reason: ''
|
15 | |
pr-lock-inactive-days: '30'
|
16 | |
pr-lock-reason: ''
|
7 | 7 |
CFLAGS_WARNINGS ?= -Wall -Wextra -Wno-unused-parameter -Werror
|
8 | 8 |
|
9 | 9 |
LDLIBS_READLINE ?= -lreadline
|
|
10 |
LDLIBS_EDITLINE ?= -ledit
|
10 | 11 |
|
11 | 12 |
CFLAGS += $(CFLAGS_OPTIMIZATION) $(CFLAGS_WARNINGS)
|
12 | |
LDLIBS += $(LDLIBS_READLINE)
|
|
13 |
|
|
14 |
O_EL := 0 # set to use the BSD editline library
|
|
15 |
|
|
16 |
ifeq ($(strip $(O_EL)),1)
|
|
17 |
LDLIBS += $(LDLIBS_EDITLINE)
|
|
18 |
else
|
|
19 |
LDLIBS += $(LDLIBS_READLINE)
|
|
20 |
endif
|
13 | 21 |
|
14 | 22 |
SRC = $(wildcard src/*.c)
|
15 | 23 |
INCLUDE = -Iinc
|
52 | 52 |
|
53 | 53 |
#### Dependencies
|
54 | 54 |
|
55 | |
`bcal` is written in C and depends on standard libc and libreadline. It invokes GNU `bc` or `calc` for non-storage expressions.
|
|
55 |
`bcal` is written in C and depends on standard libc and GNU Readline (or [BSD Editline](https://www.thrysoee.dk/editline/)). It invokes GNU `bc` or `calc` for non-storage expressions.
|
56 | 56 |
|
57 | 57 |
To use `calc`:
|
58 | 58 |
|
|
75 | 75 |
|
76 | 76 |
Install to default location (`/usr/local`):
|
77 | 77 |
|
78 | |
$ make
|
79 | 78 |
$ sudo make strip install
|
|
79 |
To link to libedit:
|
|
80 |
|
|
81 |
$ sudo make O_EL=1 strip install
|
80 | 82 |
To uninstall, run:
|
81 | 83 |
|
82 | 84 |
$ sudo make uninstall
|
|
0 |
bcal (2.4+git20221211.1.8d835d4-1) UNRELEASED; urgency=low
|
|
1 |
|
|
2 |
* New upstream snapshot.
|
|
3 |
|
|
4 |
-- Debian Janitor <janitor@jelmer.uk> Wed, 08 Feb 2023 09:46:01 -0000
|
|
5 |
|
0 | 6 |
bcal (2.4-2) unstable; urgency=medium
|
1 | 7 |
|
2 | 8 |
* Fix d/watch issue
|
42 | 42 |
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
43 | 43 |
#define MAX_BITS 128
|
44 | 44 |
#define ALIGNMENT_MASK_4BIT 0xF
|
|
45 |
#define ELEMENTS(x) (sizeof(x) / sizeof(*(x)))
|
45 | 46 |
|
46 | 47 |
typedef unsigned char bool;
|
47 | 48 |
typedef unsigned char uchar;
|
|
87 | 88 |
|
88 | 89 |
static Data lastres = {"\0", 0};
|
89 | 90 |
static settings cfg = {0, 0, 0, 0, 0, INFO};
|
|
91 |
|
|
92 |
static const char* const error_strings[] = {
|
|
93 |
"is undefined",
|
|
94 |
"Missing operator"
|
|
95 |
};
|
90 | 96 |
|
91 | 97 |
static void debug_log(const char *func, int level, const char *format, ...)
|
92 | 98 |
{
|
|
294 | 300 |
while (isspace(*ptr)) /* calc results have space before them */
|
295 | 301 |
++ptr;
|
296 | 302 |
|
297 | |
printf("%s", ptr);
|
298 | |
if (cfg.calc && strstr(ptr, "is undefined"))
|
299 | |
return -1;
|
300 | |
|
|
303 |
printf("%s", ptr); /* Print the result/error */
|
|
304 |
|
|
305 |
/* Detect common error conditions for calc and stop */
|
|
306 |
if (cfg.calc)
|
|
307 |
for (size_t r = 0; r < ELEMENTS(error_strings); ++r)
|
|
308 |
if (strstr(ptr, error_strings[r]))
|
|
309 |
return -1;
|
|
310 |
|
|
311 |
/* Store the result in 'r' for next usage */
|
301 | 312 |
len = bstrlcpy(lastres.p, ptr, NUM_LEN);
|
302 | 313 |
|
303 | 314 |
/* remove newline appended at the end of result by bc */
|