Removed compiler double include check (bug 4863, r=dvander).
Removed compiler double include check (
bug 4863, r=dvander).
1.1 --- a/sourcepawn/compiler/sc2.c Tue May 24 10:17:48 2011 -0400
1.2 +++ b/sourcepawn/compiler/sc2.c Tue May 24 10:49:40 2011 -0400
1.3 @@ -269,27 +269,9 @@
1.4 if (c!='\0')
1.5 check_empty(lptr+1); /* verify that the rest of the line is whitespace */
1.6
1.7 - /* create a symbol from the name of the include file; this allows the system
1.8 - * to test for multiple inclusions
1.9 - */
1.10 - strcpy(symname,"_inc_");
1.11 - if ((ptr=strrchr(name,DIRSEP_CHAR))!=NULL)
1.12 - strlcat(symname,ptr+1,sizeof symname);
1.13 - else
1.14 - strlcat(symname,name,sizeof symname);
1.15 - if (find_symbol(&glbtab,symname,fcurrent,-1,NULL)==NULL) {
1.16 - /* constant is not present, so this file has not been included yet */
1.17 -
1.18 - /* Include files between "..." or without quotes are read from the current
1.19 - * directory, or from a list of "include directories". Include files
1.20 - * between <...> are only read from the list of include directories.
1.21 - */
1.22 - result=plungefile(name,(c!='>'),TRUE);
1.23 - if (result)
1.24 - add_constant(symname,1,sGLOBAL,0);
1.25 - else if (!silent)
1.26 - error(120,name); /* cannot read from ... (fatal error) */
1.27 - } /* if */
1.28 + result=plungefile(name,(c!='>'),TRUE);
1.29 + if (!result && !silent)
1.30 + error(120,name); /* cannot read from ... (fatal error) */
1.31 }
1.32
1.33 /* readline