summaryrefslogtreecommitdiff
path: root/usr.bin/make/lowparse.c
AgeCommit message (Collapse)Author
2000-11-24Clean-ups:Marc Espie
* Buf_Destroy can be a macro * X_ instead of _X for struct names, to avoid infringing on the system's namespace. * better wildcard detection heuristics * fix #ifdef CLEANUP code * a few comments
2000-09-14Some systematic clean-up.Marc Espie
- UNUSED macro that expands to __attribute__((unused)) for gcc - move rcsid around so that they can be tagged UNUSED. - activate -Wunused. - use UNUSED instead of kludgy junk for function arguments. - add extern to all extern prototypes. - update comments in lst.h. - clean up var.c a little bit, constifying arguments, updating comments...
2000-07-17FALLTHRU -> FALLTHROUGH, requested by miod@ and style(9)Marc Espie
2000-06-23This is complementary to the previous patch.Marc Espie
There is no code change in this patch, we just move the remaining `lowparse' functions to the right file, and adjust the interface file accordingly. Reviewed by miod@
2000-06-23This patch is worth a lot, speed-wise.Marc Espie
This does introduce a proper stack of IFiles to handle included files: instead of having the current file be a special case, it's also an IFile. The corresponding code is slightly unobfuscated, removing the error-prone ParseEOF function, freeing the filename systematically (thus, main.c needs to strdup stdin), and merging both include functions lookup into one. The speed gain comes from changing the IFile structure to merge with fgetln seamlessly. The low-level parse code is mostly moved to a new file, lowparse.c, to make things easier to read (see next patch as well). Accordingly, util.c gains a fgetln. Note the interaction between Parse_File, Dir_FindFile, and ReadMakefile in main.c. This patch closes a subtle memory hole (only the Makefile names, so rather small). Reviewed by miod@.