Update from PSI
r1039 | ffr | 2006-08-03 09:59:29 +1000 (Thu, 03 Aug 2006) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
4aa50787c2
commit
074f1cb3cd
22
access.c
22
access.c
@@ -3,8 +3,9 @@
|
||||
|
||||
Mark Koennecke, November 1996
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef PCODE
|
||||
#define PCODE
|
||||
#include <string.h>
|
||||
#include <sics.h>
|
||||
#include <splitter.h>
|
||||
|
||||
static char *aCode[] = {
|
||||
"internal",
|
||||
@@ -13,4 +14,19 @@
|
||||
"spy",
|
||||
NULL };
|
||||
static int iCodes = 4;
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
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