Skip to content

Replaces ConcNameAndVersion and ConcDirAndName macros with functions #533

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

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f28c014
Replaces ConcNameAndVersion and ConcDirAndName macros with functions
nbriggs Feb 4, 2025
d484368
Adds destination size to conc_... functions and switch to strlcpy/str…
nbriggs Feb 25, 2025
63e21fd
Replaces all strcpy() by strlcpy() in dsk.c
nbriggs Feb 25, 2025
1776533
Replaces strcat() with strlcat() in dsk.c
nbriggs Feb 25, 2025
df93805
Updates unixpathname() signature to include output string length, rep…
nbriggs Feb 25, 2025
1b2a465
Replaces all calls to sprintf() with snprintf() in ufs.c
nbriggs Feb 25, 2025
2525316
Replace sprintf() with snprintf()
nbriggs Feb 25, 2025
c86190b
Adds size of output parameter to lisppathname() and replaces various …
nbriggs Mar 3, 2025
acf41ce
Clean up quote_fname, quote_fname_ufs, and quote_dname
nbriggs May 12, 2025
b9a4533
Replaces unchecked strcpy/strcat with strlcpy/strlcat
nbriggs May 19, 2025
3c6ffa3
Replaces unchecked strcpy with strlcpy.
nbriggs May 19, 2025
2fb64be
Replaces unchecked strcpy with strlcpy.
nbriggs May 19, 2025
7174a0b
Replaces unchecked strcpy with strlcpy.
nbriggs May 19, 2025
d822d47
Replaces unchecked strcpy/strcat with strlcpy/strlcat
nbriggs May 20, 2025
c2b1b7a
Improves performance of some file operations, fixes some memory leaks…
nbriggs May 23, 2025
bdf9ff4
Resolves issue medley #2165 ignored quoting characters in filename
nbriggs May 23, 2025
2b909ff
Fixup: wrong quoting function used in updates to enum_ufs, enum_ufs_prop
nbriggs May 25, 2025
5a1ab15
Improves UnixVersionToLispVersion, LispVersionToUnixVersion and separ…
nbriggs Jun 2, 2025
e50a3ee
"as if" => "as is" in comments.
nbriggs Jun 2, 2025
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
2 changes: 1 addition & 1 deletion bin/makefile-dos
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SRCFILES = conspage.c gcoflow.c shift.c dbgtool.c gcr.c gcrcell.c llstk.
OFILES = conspage.obj gcoflow.obj shift.obj dbgtool.obj gcr.obj gcrcell.obj llstk.obj gcscan.obj loopsops.obj storage.obj allocmds.obj dir.obj gvar2.obj lowlev1.obj subr.obj arithops.obj lowlev2.obj subr0374.obj doscomm.obj hardrtn.obj lsthandl.obj sxhash.obj draw.obj main.obj testtool.obj array.obj dsk.obj inet.obj misc7.obj timer.obj array2.obj dspif.obj initdsp.obj miscn.obj typeof.obj array3.obj initkbd.obj ubf1.obj array4.obj dspsubrs.obj initsout.obj mkatom.obj ubf2.obj array5.obj eqf.obj intcall.obj mkcell.obj ubf3.obj array6.obj ether.obj ufn.obj atom.obj findkey.obj kbdsubrs.obj mouseif.obj ufs.obj bbtsub.obj foreign.obj keyevent.obj unixcomm.obj bin.obj fp.obj binds.obj fvar.obj mvs.obj unwind.obj bitblt.obj gc.obj uraid.obj blt.obj gc2.obj kprint.obj osmsg.obj usrsubr.obj byteswap.obj gcarray.obj perrno.obj uutils.obj carcdr.obj asmbbt.obj gccode.obj vars3.obj gcfinal.obj ldsout.obj return.obj vmemsave.obj chardev.obj gchtfind.obj lineblt8.obj rpc.obj xc.obj common.obj gcmain3.obj lisp2c.obj rplcons.obj z2.obj vdate.obj $(COLORFILES) $(ARCHFILES) $(LPFILES)


HFILES = address.h adr68k.h arithopsdefs.h arith.h cell.h dbprint.h display.h dspif.h ifpage.h iopage.h lispemul.h lispmap.h lsptypes.h miscstat.h lspglob.h array.h bb.h bbtmacro.h debug.h devconf.h dspdata.h fast_dsp.h gcdata.h initatms.h inlinec.h keyboard.h lispver1.h lispver2.h lldsp.h locfile.h medleyfp.h mouseif.h my.h opcodes.h osmsgprint.h pilotbbt.h print.h retmacro.h stack.h stream.h subrs.h timeout.h tos1defs.h tosfns.h tosret.h xdefs.h xbitmaps.h xkeymap.h
HFILES = address.h adr68k.h arithopsdefs.h arith.h cell.h dbprint.h display.h dspif.h ifpage.h iopage.h lispemul.h lispmap.h lsptypes.h miscstat.h lspglob.h array.h bb.h bbtmacro.h debug.h devconf.h dspdata.h fast_dsp.h gcdata.h initatms.h inlinec.h keyboard.h lldsp.h locfile.h medleyfp.h mouseif.h my.h opcodes.h osmsgprint.h pilotbbt.h print.h retmacro.h stack.h stream.h subrs.h timeout.h tos1defs.h tosfns.h tosret.h xdefs.h xbitmaps.h xkeymap.h



Expand Down
18 changes: 9 additions & 9 deletions bin/makefile-tail
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ $(OBJECTDIR)car-cdr.o: $(SRCDIR)car-cdr.c $(REQUIRED-INCS) \
$(OBJECTDIR)chardev.o: $(SRCDIR)chardev.c $(REQUIRED-INCS) \
$(INCDIR)lispemul.h $(INCDIR)lispmap.h \
$(INCDIR)adr68k.h $(INCDIR)lsptypes.h $(INCDIR)arith.h $(INCDIR)timeout.h \
$(INCDIR)locfile.h $(INCDIR)lispver2.h $(INCDIR)dbprint.h \
$(INCDIR)locfile.h $(INCDIR)dbprint.h \
$(INCDIR)chardevdefs.h $(INCDIR)byteswapdefs.h $(INCDIR)commondefs.h \
$(INCDIR)perrnodefs.h
$(CC) $(RFLAGS) $(SRCDIR)chardev.c -o $(OBJECTDIR)chardev.o
Expand Down Expand Up @@ -505,7 +505,7 @@ $(OBJECTDIR)dsk.o: $(SRCDIR)dsk.c $(REQUIRED-INCS) \
$(INCDIR)lispemul.h $(INCDIR)lispmap.h \
$(INCDIR)adr68k.h $(INCDIR)lsptypes.h $(INCDIR)lspglob.h $(INCDIR)ifpage.h \
$(INCDIR)iopage.h $(INCDIR)miscstat.h $(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)timeout.h $(INCDIR)locfile.h $(INCDIR)lispver2.h \
$(INCDIR)timeout.h $(INCDIR)locfile.h \
$(INCDIR)dbprint.h $(INCDIR)dskdefs.h $(INCDIR)byteswapdefs.h \
$(INCDIR)car-cdrdefs.h $(INCDIR)cell.h $(INCDIR)commondefs.h \
$(INCDIR)ufsdefs.h
Expand All @@ -515,15 +515,15 @@ $(OBJECTDIR)ufs.o: $(SRCDIR)ufs.c $(REQUIRED-INCS) \
$(INCDIR)lispemul.h $(INCDIR)lispmap.h \
$(INCDIR)adr68k.h $(INCDIR)lsptypes.h $(INCDIR)lspglob.h $(INCDIR)ifpage.h \
$(INCDIR)iopage.h $(INCDIR)miscstat.h $(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)timeout.h $(INCDIR)locfile.h $(INCDIR)lispver2.h $(INCDIR)dbprint.h \
$(INCDIR)timeout.h $(INCDIR)locfile.h $(INCDIR)dbprint.h \
$(INCDIR)ufsdefs.h $(INCDIR)commondefs.h $(INCDIR)dskdefs.h
$(CC) $(RFLAGS) $(SRCDIR)ufs.c -o $(OBJECTDIR)ufs.o

$(OBJECTDIR)dir.o: $(SRCDIR)dir.c $(REQUIRED-INCS) \
$(INCDIR)lispemul.h $(INCDIR)lispmap.h \
$(INCDIR)adr68k.h $(INCDIR)lsptypes.h $(INCDIR)arith.h $(INCDIR)lspglob.h \
$(INCDIR)ifpage.h $(INCDIR)iopage.h $(INCDIR)miscstat.h $(INCDIR)timeout.h \
$(INCDIR)locfile.h $(INCDIR)lispver2.h $(INCDIR)dirdefs.h \
$(INCDIR)locfile.h $(INCDIR)dirdefs.h \
$(INCDIR)commondefs.h $(INCDIR)dskdefs.h $(INCDIR)ufsdefs.h
$(CC) $(RFLAGS) $(SRCDIR)dir.c -o $(OBJECTDIR)dir.o

Expand Down Expand Up @@ -640,7 +640,7 @@ $(OBJECTDIR)inet.o: $(SRCDIR)inet.c $(REQUIRED-INCS) \
$(INCDIR)lispemul.h $(INCDIR)lispmap.h \
$(INCDIR)lsptypes.h $(INCDIR)arith.h $(INCDIR)emlglob.h $(INCDIR)lspglob.h \
$(INCDIR)ifpage.h $(INCDIR)iopage.h $(INCDIR)miscstat.h $(INCDIR)adr68k.h \
$(INCDIR)dbprint.h $(INCDIR)locfile.h $(INCDIR)lispver2.h \
$(INCDIR)dbprint.h $(INCDIR)locfile.h \
$(INCDIR)inetdefs.h $(INCDIR)byteswapdefs.h $(INCDIR)commondefs.h \
$(INCDIR)mkcelldefs.h
$(CC) $(RFLAGS) $(SRCDIR)inet.c -o $(OBJECTDIR)inet.o
Expand Down Expand Up @@ -758,7 +758,7 @@ $(OBJECTDIR)osmsg.o: $(SRCDIR)osmsg.c $(REQUIRED-INCS) \
$(INCDIR)lispemul.h $(INCDIR)lispmap.h \
$(INCDIR)adr68k.h $(INCDIR)lsptypes.h $(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)lspglob.h $(INCDIR)ifpage.h $(INCDIR)iopage.h $(INCDIR)miscstat.h \
$(INCDIR)timeout.h $(INCDIR)locfile.h $(INCDIR)lispver2.h $(INCDIR)osmsgprint.h \
$(INCDIR)timeout.h $(INCDIR)locfile.h $(INCDIR)osmsgprint.h \
$(INCDIR)dbprint.h $(INCDIR)commondefs.h $(INCDIR)osmsgdefs.h
$(CC) $(RFLAGS) $(SRCDIR)osmsg.c -o $(OBJECTDIR)osmsg.o

Expand Down Expand Up @@ -865,7 +865,7 @@ $(OBJECTDIR)unixcomm.o: $(SRCDIR)unixcomm.c $(REQUIRED-INCS) \
$(INCDIR)lspglob.h $(INCDIR)ifpage.h $(INCDIR)iopage.h $(INCDIR)miscstat.h \
$(INCDIR)cell.h $(INCDIR)stack.h $(INCDIR)arith.h $(INCDIR)dbprint.h \
$(INCDIR)timeout.h $(INCDIR)unixcommdefs.h $(INCDIR)byteswapdefs.h \
$(INCDIR)commondefs.h $(INCDIR)locfile.h $(INCDIR)lispver2.h
$(INCDIR)commondefs.h $(INCDIR)locfile.h
$(CC) $(RFLAGS) $(SRCDIR)unixcomm.c -o $(OBJECTDIR)unixcomm.o

$(OBJECTDIR)unixfork.o: $(SRCDIR)unixfork.c $(REQUIRED-INCS) \
Expand All @@ -888,7 +888,7 @@ $(OBJECTDIR)rpc.o: $(SRCDIR)rpc.c $(REQUIRED-INCS) \
$(INCDIR)lispemul.h $(INCDIR)lispmap.h \
$(INCDIR)lsptypes.h $(INCDIR)lspglob.h $(INCDIR)ifpage.h $(INCDIR)iopage.h \
$(INCDIR)miscstat.h $(INCDIR)emlglob.h $(INCDIR)adr68k.h $(INCDIR)arith.h \
$(INCDIR)locfile.h $(INCDIR)lispver2.h $(INCDIR)rpcdefs.h \
$(INCDIR)locfile.h $(INCDIR)rpcdefs.h \
$(INCDIR)commondefs.h
$(CC) $(RFLAGS) $(SRCDIR)rpc.c -o $(OBJECTDIR)rpc.o

Expand All @@ -909,7 +909,7 @@ $(OBJECTDIR)vmemsave.o: $(SRCDIR)vmemsave.c $(REQUIRED-INCS) \
$(INCDIR)lispemul.h \
$(INCDIR)lispmap.h $(INCDIR)lspglob.h $(INCDIR)ifpage.h $(INCDIR)iopage.h \
$(INCDIR)miscstat.h $(INCDIR)timeout.h $(INCDIR)adr68k.h \
$(INCDIR)lsptypes.h $(INCDIR)locfile.h $(INCDIR)lispver2.h $(INCDIR)dbprint.h \
$(INCDIR)lsptypes.h $(INCDIR)locfile.h $(INCDIR)dbprint.h \
$(INCDIR)devif.h $(INCDIR)vmemsavedefs.h $(INCDIR)byteswapdefs.h $(INCDIR)commondefs.h \
$(INCDIR)dskdefs.h $(INCDIR)initkbddefs.h $(INCDIR)perrnodefs.h \
$(INCDIR)ufsdefs.h
Expand Down
2 changes: 1 addition & 1 deletion inc/dirdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ typedef struct dfinfo {
} DFINFO;

#ifdef DOS
int make_old_version(char *old, char *file);
int make_old_version(char *old, size_t oldsize, char *file);
#endif
#ifdef FSDEBUG
void print_finfo(FINFO *fp);
Expand Down
6 changes: 4 additions & 2 deletions inc/dskdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ LispPTR COM_writepage(LispPTR *args);
LispPTR COM_truncatefile(LispPTR *args);
LispPTR COM_changedir(LispPTR *args);
LispPTR COM_getfreeblock(LispPTR *args);
void separate_version(char *name, char *ver, int checkp);
void conc_dir_and_name(char *dir, char *name, char *fname, size_t fname_size);
void conc_name_and_version(char *name, char *ver, char *rname, size_t rname_size);
void separate_version(char *name, size_t namesize, char *ver, size_t versize, int checkp);
int unpack_filename(char *file, char *dir, char *name, char *ver, int checkp);
int true_name(char *path);
int true_name(char *path, size_t pathsize);
#endif
47 changes: 0 additions & 47 deletions inc/lispver1.h

This file was deleted.

74 changes: 0 additions & 74 deletions inc/lispver2.h

This file was deleted.

Loading