CStrings.mesa
Copyright Ó 1991, 1992 by Xerox Corporation. All rights reserved.
Willie-s, August 8, 1991 2:22 pm PDT
~
BEGIN
taken from string.h and strings.h
CString:
TYPE =
POINTER
TO Basics.RawChars ¬
NIL;
there is no guarantee that the chars pointed to will be word aligned
Strcat:
UNSAFE
PROC[s1, s2: CString]
RETURNS[CString] ~
TRUSTED
MACHINE
CODE {
"strcat"
Strncat:
UNSAFE
PROC[s1, s2: CString, n:
INT]
RETURNS[CString] ~
TRUSTED
MACHINE
CODE {
"strncat"
Strdup:
PROC[s1: CString]
RETURNS[CString] ~
TRUSTED
MACHINE
CODE {
"strdup"
Strcmp:
PROC[s1, s2: CString]
RETURNS[
INT] ~
TRUSTED
MACHINE
CODE {
"strcmp"
Strncmp:
PROC[s1, s2: CString, max:
INT]
RETURNS[
INT] ~
TRUSTED
MACHINE
CODE {
"strncmp"
};
Strcpy:
UNSAFE
PROC[s1, s2: CString]
RETURNS[CString] ~
TRUSTED
MACHINE
CODE {
"strcpyt"
Strncpy:
UNSAFE
PROC[s1, s2: CString, n:
INT]
RETURNS[CString] ~
TRUSTED
MACHINE
CODE {
"strncpy"
Strlen:
PROC[s: CString]
RETURNS[
INT] ~
TRUSTED
MACHINE
CODE {
"strlen"
};
Strchr:
PROC[s1: CString, c:
INT]
RETURNS[CString] ~
TRUSTED
MACHINE
CODE {
"strchr"
Strrchr:
PROC[s1: CString, c:
INT]
RETURNS[CString] ~
TRUSTED
MACHINE
CODE {
"strrchr"
};
Strpbrk:
PROC[s1, s2: CString]
RETURNS[CString] ~
TRUSTED
MACHINE
CODE {
"strpbrk"
Strspn:
PROC[s1, s2: CString]
RETURNS[
INT] ~
TRUSTED
MACHINE
CODE {
"strspn"
};
Strcspn:
PROC[s1, s2: CString]
RETURNS[
INT] ~
TRUSTED
MACHINE
CODE {
"strcspn"
};
Index:
PROC[s1: CString, c:
CHAR]
RETURNS[CString] ~
TRUSTED
MACHINE
CODE {
"index"
RIndex:
PROC[s1: CString, c:
CHAR]
RETURNS[CString] ~
TRUSTED
MACHINE
CODE {
"rindex"
};