Commit d7d591cf authored by rswindell's avatar rswindell

Added WIN32, UNIX, and LINUX ARS keywords.

parent 9107b253
......@@ -263,6 +263,27 @@ uchar* arstr(ushort* count, char* str, scfg_t* cfg)
not=0;
ar[j++]=artype;
i+=2; }
else if(!strncmp(str+i,"WIN32",5)) {
artype=AR_WIN32;
if(not)
ar[j++]=AR_NOT;
not=0;
ar[j++]=artype;
i+=2; }
else if(!strncmp(str+i,"UNIX",4)) {
artype=AR_UNIX;
if(not)
ar[j++]=AR_NOT;
not=0;
ar[j++]=artype;
i+=2; }
else if(!strncmp(str+i,"LINUX",5)) {
artype=AR_LINUX;
if(not)
ar[j++]=AR_NOT;
not=0;
ar[j++]=artype;
i+=2; }
else if(!strncmp(str+i,"SUBCODE",7)) {
artype=AR_SUBCODE;
i+=6; }
......
......@@ -104,6 +104,9 @@ enum { /* Access requirement binaries */
,AR_DIRCODE
,AR_OS2
,AR_DOS
,AR_WIN32
,AR_UNIX
,AR_LINUX
};
#endif /* Don't add anything after this line */
......@@ -157,6 +157,27 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
result=!not;
#endif
break;
case AR_WIN32:
#ifndef _WIN32
result=not;
#else
result=!not;
#endif
break;
case AR_UNIX:
#ifndef __unix__
result=not;
#else
result=!not;
#endif
break;
case AR_LINUX:
#ifndef __linux__
result=not;
#else
result=!not;
#endif
break;
case AR_EXPERT:
if(!(user->misc&EXPERT))
result=not;
......
......@@ -789,6 +789,27 @@ static BOOL ar_exp(scfg_t* cfg, uchar **ptrptr, user_t* user)
result=!not;
#endif
break;
case AR_WIN32:
#ifndef _WIN32
result=not;
#else
result=!not;
#endif
break;
case AR_UNIX:
#ifndef __unix__
result=not;
#else
result=!not;
#endif
break;
case AR_LINUX:
#ifndef __linux__
result=not;
#else
result=!not;
#endif
break;
case AR_EXPERT:
if(!(user->misc&EXPERT))
result=not;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment