- Adapted indenation to new agreed upon system
- Added support for second generation scriptcontext based counter
This commit is contained in:
40
access.c
40
access.c
@@ -7,26 +7,28 @@
|
||||
#include <sics.h>
|
||||
#include <splitter.h>
|
||||
|
||||
static char *aCode[] = {
|
||||
"internal",
|
||||
"mugger",
|
||||
"user",
|
||||
"spy",
|
||||
NULL };
|
||||
static int iCodes = 4;
|
||||
static char *aCode[] = {
|
||||
"internal",
|
||||
"mugger",
|
||||
"user",
|
||||
"spy",
|
||||
NULL
|
||||
};
|
||||
static int iCodes = 4;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int decodeSICSPriv(char *privText){
|
||||
int code = 0;
|
||||
|
||||
strtolower(privText);
|
||||
while(aCode[code] != NULL){
|
||||
if(strcmp(aCode[code], privText) == 0){
|
||||
return code;
|
||||
}
|
||||
code++;
|
||||
}
|
||||
if(code >= iCodes){
|
||||
return -1;
|
||||
int decodeSICSPriv(char *privText)
|
||||
{
|
||||
int code = 0;
|
||||
|
||||
strtolower(privText);
|
||||
while (aCode[code] != NULL) {
|
||||
if (strcmp(aCode[code], privText) == 0) {
|
||||
return code;
|
||||
}
|
||||
code++;
|
||||
}
|
||||
if (code >= iCodes) {
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user