Selaa lähdekoodia

move system include files to subdir

master
Ian Piumarta 3 kuukautta sitten
vanhempi
commit
ddf85ac562
5 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. +0
    -0
      include/assert.h
  2. +1
    -0
      include/stdio.h
  3. +0
    -0
      include/stdlib.h
  4. +0
    -0
      include/string.h
  5. +4
    -2
      main.leg

+ 0
- 0
include/assert.h Näytä tiedosto


+ 1
- 0
include/stdio.h Näytä tiedosto

@ -0,0 +1 @@
extern int printf(char *, ...);

+ 0
- 0
include/stdlib.h Näytä tiedosto


+ 0
- 0
include/string.h Näytä tiedosto


+ 4
- 2
main.leg Näytä tiedosto

@ -1,6 +1,6 @@
# main.leg -- C parser + interpreter
#
# Last edited: 2025-01-24 22:12:50 by piumarta on zora
# Last edited: 2025-01-25 08:53:25 by piumarta on m1mbp
%{
;
@ -1339,7 +1339,9 @@ void popInput(void)
FILE *sysOpen(char *path)
{
FILE *fp = fopen(path, "r");
char abspath[1024];
snprintf(abspath, sizeof(abspath), "include/%s", path);
FILE *fp = fopen(abspath, "r");
if (!fp) fatal("#include <%s>: %s", path, strerror(errno));
return fp;
}

Ladataan…
Peruuta
Tallenna