Codebase list bcal / bb3a3fb
New upstream snapshot. Debian Janitor 1 year, 2 months ago
9 changed file(s) with 35 addition(s) and 71 deletion(s). Raw diff Collapse all Expand all
00 ---
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'
22 WarningsAsErrors: '*'
33 HeaderFilterRegex: '.*(?<!lookup3.c)$'
44 FormatStyle: 'file'
+0
-1
.github/FUNDING.yml less more
0 github: jarun
+0
-43
.github/workflows/ci.yml less more
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
-17
.github/workflows/lock.yml less more
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: ''
+0
-2
.gitignore less more
0 bcal
1 /dist/*
77 CFLAGS_WARNINGS ?= -Wall -Wextra -Wno-unused-parameter -Werror
88
99 LDLIBS_READLINE ?= -lreadline
10 LDLIBS_EDITLINE ?= -ledit
1011
1112 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
1321
1422 SRC = $(wildcard src/*.c)
1523 INCLUDE = -Iinc
5252
5353 #### Dependencies
5454
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.
5656
5757 To use `calc`:
5858
7575
7676 Install to default location (`/usr/local`):
7777
78 $ make
7978 $ sudo make strip install
79 To link to libedit:
80
81 $ sudo make O_EL=1 strip install
8082 To uninstall, run:
8183
8284 $ 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
06 bcal (2.4-2) unstable; urgency=medium
17
28 * Fix d/watch issue
4242 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
4343 #define MAX_BITS 128
4444 #define ALIGNMENT_MASK_4BIT 0xF
45 #define ELEMENTS(x) (sizeof(x) / sizeof(*(x)))
4546
4647 typedef unsigned char bool;
4748 typedef unsigned char uchar;
8788
8889 static Data lastres = {"\0", 0};
8990 static settings cfg = {0, 0, 0, 0, 0, INFO};
91
92 static const char* const error_strings[] = {
93 "is undefined",
94 "Missing operator"
95 };
9096
9197 static void debug_log(const char *func, int level, const char *format, ...)
9298 {
294300 while (isspace(*ptr)) /* calc results have space before them */
295301 ++ptr;
296302
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 */
301312 len = bstrlcpy(lastres.p, ptr, NUM_LEN);
302313
303314 /* remove newline appended at the end of result by bc */