Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add gitignore, fix c99 warnings #15

Merged
merged 1 commit into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.o
Copy link
Contributor

@wlammen wlammen Dec 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metamath is not only distributed via GitHub but also via an archive tar file. In the latter case, a gitignore may overwrite an existing one, because the tar-file contents could be extracted within an existing git environment.

When I extract an archive, I simply do not expect a gitignore be present. That this file is usually invisible, adds to possible complications.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, we should adjust the archival process to not include the .gitignore file (or the .git folder, for that matter). Putting the sources in a src folder may help with this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose merging this with the .gitignore as is. Currently archive generation is on hiatus since Norm isn't around to keep it running anymore, and when it returns it will be powered by github actions or such and so we will be able to adjust it as necessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means we abandon the distribution via a tar file for now. IMO GitHub is good enough to be the primary (and possibly only) distribution path. This is still a strategic decision that should be evaluated as an issue first.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'm done for the day but you should open an issue about this. I agree that GitHub can become the new distribution path. The tar file method is already dead I think, since it's manually triggered and 0.198 is the last version that will be produced that way. You can still produce 0.198 from github sources, but 0.200 will use an as-yet-unwritten tar building script running in CI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to merge this - there was no real objection #19 after more than a week.

*.Po
autom4te.cache/
stamp-h1
missing
metamath
Makefile
Makefile.in
compile
configure
config.*
depcomp
install-sh
aclocal.m4
5 changes: 4 additions & 1 deletion metamath.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,10 @@ void command(int argc, char *argv[]) {
}
}
/* Do the operating system command */
(void)system(str1);
/* The use of (void)!f() is to ignore the value on both
clang (which takes (void) as an ignore indicator)
and gcc (which doesn't but is fooled by the ! operator). */
(void)!system(str1);
#ifdef VAXC
printf("\n"); /* Last line from VAX doesn't have new line */
#endif
Expand Down
12 changes: 1 addition & 11 deletions mminou.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,6 @@ flag print2(char* fmt, ...) {
long i;

char *printBuffer; /* Allocated dynamically */
/* gcc (Debian 4.9.2-10+deb8u2) 4.9.2 gives error for ssize_t if -c99
is specified; gcc (GCC) 7.3.0 doesn't complain if -c99 is specified */
/* See https://sourceforge.net/p/predef/wiki/Compilers/ for __LCC__ */
#ifdef __LCC__ /* ssize_t not defined for lcc compiler */
long bufsiz;
#else
ssize_t bufsiz; /* ssize_t (signed size_t) can represent the number -1 for
error checking */
#endif


if (backBufferPos == 0) {
/* Initialize backBuffer - 1st time in program */
Expand Down Expand Up @@ -216,7 +206,7 @@ flag print2(char* fmt, ...) {

/* Allow unlimited output size */
va_start(ap, fmt);
bufsiz = vsnprintf(NULL, 0, fmt, ap); /* Get the buffer size we need */
int bufsiz = vsnprintf(NULL, 0, fmt, ap); /* Get the buffer size we need */
va_end(ap);
/* Warning: some older complilers, including lcc-win32 version 3.8 (2004),
return -1 instead of the buffer size */
Expand Down