Finish up Purge Mode:

o Make it recognize constant expressions (yay!)
o Make it not add a blank line to end of *.purged files.
o Make it nuke #!P comments in the source files.
This commit is contained in:
David F. Skoll
2010-04-21 09:02:25 -04:00
parent 70adbf90c2
commit a1faa8d804
16 changed files with 83 additions and 41 deletions
+2 -2
View File
@@ -243,7 +243,7 @@ static void FSet(UserFunc *f)
/* Call a user-defined function. */
/* */
/***************************************************************/
int CallUserFunc(char const *name, int nargs)
int CallUserFunc(char const *name, int nargs, ParsePtr p)
{
UserFunc *f;
int h = HashVal(name) % FUNC_HASH_SIZE;
@@ -301,7 +301,7 @@ int CallUserFunc(char const *name, int nargs)
/* Skip the opening bracket, if there's one */
while (isempty(*s)) s++;
if (*s == BEG_OF_EXPR) s++;
h = Evaluate(&s, f->locals);
h = Evaluate(&s, f->locals, p);
f->IsActive = 0;
DestroyLocalVals(f);
if (DebugFlag &DB_PRTEXPR) {