VFS: Fix various things
- The "ALL" fake pathID is replaced by what does SM, having a public var NULL_STRING which will acts as NULL when needed. To make compiler accepting public array, this patch was needed: https://hg.alliedmods.net/sourcemod-central/rev/b12f329def09 - The offset thing in read_dir: considering that's something very specific to this native and that implementation in CDirectory doesn't make sense because of the offset compatibility for windows, all code is now in the native.
This commit is contained in:
@ -1895,8 +1895,10 @@ static void declglb(char *firstname,int firsttag,int fpublic,int fstatic,int fst
|
||||
if (size > INT_MAX)
|
||||
error(105); /* overflow, exceeding capacity */
|
||||
#endif
|
||||
#if 0 /* We don't actually care */
|
||||
if (ispublic)
|
||||
error(56,name); /* arrays cannot be public */
|
||||
#endif
|
||||
dim[numdim++]=(int)size;
|
||||
} /* while */
|
||||
/* if this variable is never used (which can be detected only in the
|
||||
@ -1936,7 +1938,7 @@ static void declglb(char *firstname,int firsttag,int fpublic,int fstatic,int fst
|
||||
sym->usage|=uDEFINE;
|
||||
} /* if */
|
||||
if (ispublic)
|
||||
sym->usage|=uPUBLIC;
|
||||
sym->usage|=uPUBLIC|uREAD;
|
||||
if (fconst)
|
||||
sym->usage|=uCONST;
|
||||
if (fstock)
|
||||
|
@ -619,7 +619,7 @@ SC_FUNC int assemble(FILE *fout,FILE *fin)
|
||||
assert(sym->vclass==sGLOBAL);
|
||||
mainaddr=sym->addr;
|
||||
} /* if */
|
||||
} else if (sym->ident==iVARIABLE) {
|
||||
} else if (sym->ident==iVARIABLE || sym->ident == iARRAY || sym->ident == iREFARRAY) {
|
||||
if ((sym->usage & uPUBLIC)!=0 && (sym->usage & (uREAD | uWRITTEN))!=0)
|
||||
match=++numpubvars;
|
||||
} /* if */
|
||||
@ -794,7 +794,8 @@ SC_FUNC int assemble(FILE *fout,FILE *fin)
|
||||
/* write the public variables table */
|
||||
count=0;
|
||||
for (sym=glbtab.next; sym!=NULL; sym=sym->next) {
|
||||
if (sym->ident==iVARIABLE && (sym->usage & uPUBLIC)!=0 && (sym->usage & (uREAD | uWRITTEN))!=0) {
|
||||
if ((sym->ident==iVARIABLE || sym->ident==iARRAY || sym->ident==iREFARRAY)
|
||||
&& (sym->usage & uPUBLIC)!=0 && (sym->usage & (uREAD | uWRITTEN))!=0) {
|
||||
assert((sym->usage & uDEFINE)!=0);
|
||||
assert(sym->vclass==sGLOBAL);
|
||||
func.address=sym->addr;
|
||||
|
Reference in New Issue
Block a user