7 Commits

Author SHA1 Message Date
e99d9f91c9 Update bootstrap files. 2024-03-15 15:25:24 +00:00
1366551750 Give all functions a formal prototype.
This makes the code C89 compliant, and removes all warnings on macOS.
2024-03-15 15:25:24 +00:00
3e1425e27f Move definition on Parameters earlier in global.h
We typedef int * to Parmeters in global.h, but not at the same time as
the other typedefs.  This causes problems when we add a function
declaration for write_scrap().

This also highlights a random `1` being passed as the parameter in one
call to write_scrap().  This is obviously wrong, but the purpose of this
fix is to remove warnings - not do a deep dive into what the code is
doing.
2024-03-15 15:25:24 +00:00
1b72ca32bf Correct prototype of write_tex().
In a reverse of write_html(), write_tex() is declared with three
parameters, but only called with two.

Removing the third parameter is fine as it is unused.
2024-03-15 15:25:24 +00:00
c4ade6e8af Correct calls to write_html()
write_html() is declared as taking two parameters, but the call to it
passes three.

We fix this by dropping the third parameter, which was labelled 'DUMMY'
anyway.
2024-03-15 15:25:24 +00:00
cead310efc Merge pull request 'And support for Gitea workflow' (#2) from workflows-demo into main
All checks were successful
BuildTest / Build and test (push) Successful in 3m50s
Reviewed-on: http://diskstation1.local:10000/mgrettondann/nuweb/pulls/2
2024-03-15 15:07:41 +00:00
8dd1620936 And support for Gitea workflow
Adds a workflow that will build and test whenever any changes are pushed
to the main branch, or a PR is opened against the main branch.
2024-03-15 15:04:57 +00:00
5 changed files with 48 additions and 15 deletions

View File

@@ -0,0 +1,33 @@
name: "BuildTest"
on:
push:
branches: [ main ]
pull_request:
breanches: [ main ]
jobs:
build:
name: "Build and test"
runs-on: ubuntu-latest
steps:
- name: "Install build deps"
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get -y --no-install-recommends install build-essential \
texlive-latex-base texlive-latex-recommended
- name: "Checkout repo"
uses: actions/checkout@v3
- name: "Bootstrap nuweb"
run: make nuweb
- name: "Make nuweb.tex"
run: make nuweb.tex nuwebdoc.tex
- name: "Build again"
run: make nuweb
- name: "Run tests"
run: make check

View File

@@ -461,7 +461,7 @@ void write_tex(char *file_name, char *tex_name)
char * p = label_name;
while (c =
#line 2750 "nuweb.w"
source_get(), c != nw_char) /* Here is 151a-01 */
source_get(), c != nw_char) /* Here is 148c-01 */
*p++ = c;
*p = '\0';
c =
@@ -761,7 +761,7 @@ static void copy_scrap(FILE *file, int prefix, Name *name)
char * p = label_name;
while (c =
#line 2750 "nuweb.w"
source_get(), c != nw_char) /* Here is 151a-01 */
source_get(), c != nw_char) /* Here is 148c-01 */
*p++ = c;
*p = '\0';
c =

View File

@@ -408,7 +408,7 @@ int collect_scrap(void)
char * p = label_name;
while (c =
#line 4388 "nuweb.w"
source_get(), c != nw_char) /* Here is 151a-01 */
source_get(), c != nw_char) /* Here is 148c-01 */
*p++ = c;
*p = '\0';
c =
@@ -1026,7 +1026,7 @@ int write_scraps(FILE *file, char *spelling, Scrap_Node *defs,
char * p = label_name;
while (c =
#line 4821 "nuweb.w"
pop(&reader), c != nw_char) /* Here is 151a-01 */
pop(&reader), c != nw_char) /* Here is 148c-01 */
*p++ = c;
*p = '\0';
c =
@@ -2059,7 +2059,7 @@ static int reject_match(Name *name, char post, ArgManager *reader)
if (sym_char(first) && sym_char(prev)) return TRUE;
if (op_char(last) && op_char(post)) return TRUE;
if (op_char(first) && op_char(prev)) return TRUE;
return FALSE; /* Here is 150b-01 */
return FALSE; /* Here is 148b-01 */
}
#line 6407 "nuweb.w"