-
Notifications
You must be signed in to change notification settings - Fork 72
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 ".pwn" to the official list of extensions. #701
base: dev
Are you sure you want to change the base?
Conversation
It is used by almost all scripts, so why shouldn't it be officially supported?
@@ -727,7 +727,7 @@ SC_FUNC cell do_static_check(int use_warning); | |||
SC_FUNC void pushstk(stkitem val); | |||
SC_FUNC stkitem popstk(void); | |||
SC_FUNC void clearstk(void); | |||
SC_FUNC int plungequalifiedfile(char *name); /* explicit path included */ | |||
SC_FUNC int plungequalifiedfile(char *name,char new_extensions); /* explicit path included */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SC_FUNC int plungequalifiedfile(char *name,char new_extensions); /* explicit path included */ | |
SC_FUNC int plungequalifiedfile(char *name,int new_extensions); /* explicit path included */ |
In this codebase boolean values are usually stored in variables of type int
. Not sure why, but still...
@@ -132,16 +132,17 @@ SC_FUNC void clearstk(void) | |||
assert(stktop==0); | |||
} | |||
|
|||
SC_FUNC int plungequalifiedfile(char *name) | |||
SC_FUNC int plungequalifiedfile(char *name,char new_extensions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SC_FUNC int plungequalifiedfile(char *name,char new_extensions) | |
SC_FUNC int plungequalifiedfile(char *name,int new_extensions) |
@@ -227,7 +228,7 @@ SC_FUNC int plungefile(char *name,int try_currentpath,int try_includepaths) | |||
int result=FALSE; | |||
|
|||
if (try_currentpath) { | |||
result=plungequalifiedfile(name); | |||
result=plungequalifiedfile(name,0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result=plungequalifiedfile(name,0); | |
result=plungequalifiedfile(name,FALSE); |
@@ -240,7 +241,7 @@ SC_FUNC int plungefile(char *name,int try_currentpath,int try_includepaths) | |||
char path[_MAX_PATH]; | |||
strlcpy(path,inpfname,len+1); | |||
strlcat(path,name,arraysize(path)); | |||
result=plungequalifiedfile(path); | |||
result=plungequalifiedfile(path,1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result=plungequalifiedfile(path,1); | |
result=plungequalifiedfile(path,TRUE); |
@@ -253,7 +254,7 @@ SC_FUNC int plungefile(char *name,int try_currentpath,int try_includepaths) | |||
char path[_MAX_PATH]; | |||
strlcpy(path,ptr,arraysize(path)); | |||
strlcat(path,name,arraysize(path)); | |||
result=plungequalifiedfile(path); | |||
result=plungequalifiedfile(path,1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result=plungequalifiedfile(path,1); | |
result=plungequalifiedfile(path,TRUE); |
@@ -664,7 +664,7 @@ int pc_compile(int argc, char *argv[]) | |||
if (strcmp(incfname,sDEF_PREFIX)==0) { | |||
plungefile(incfname,FALSE,TRUE); /* parse "default.inc" */ | |||
} else { | |||
if (!plungequalifiedfile(incfname)) /* parse "prefix" include file */ | |||
if (!plungequalifiedfile(incfname,1)) /* parse "prefix" include file */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!plungequalifiedfile(incfname,1)) /* parse "prefix" include file */ | |
if (!plungequalifiedfile(incfname,TRUE)) /* parse "prefix" include file */ |
@@ -755,7 +755,7 @@ int pc_compile(int argc, char *argv[]) | |||
if (strcmp(incfname,sDEF_PREFIX)==0) | |||
plungefile(incfname,FALSE,TRUE); /* parse "default.inc" (again) */ | |||
else | |||
plungequalifiedfile(incfname); /* parse implicit include file (again) */ | |||
plungequalifiedfile(incfname,1); /* parse implicit include file (again) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plungequalifiedfile(incfname,1); /* parse implicit include file (again) */ | |
plungequalifiedfile(incfname,TRUE); /* parse implicit include file (again) */ |
What this PR does / why we need it:
Adds
".pwn"
to the list of include extensions. It is used by almost all scripts, so why shouldn't it be officially supported?Which issue(s) this PR fixes:
Fixes #
What kind of pull this is:
Additional Documentation: