6 static char *
rcsid=
"@(#)$Id: charstring.old.c,v 1.1.1.1 2003/11/20 07:46:26 eus Exp $";
33 register int newval=ckintval(argv[2]);
48 {
ckarg(1); n=ckintval(argv[0]);
49 return((isupper(n))?
T:
NIL);}
55 {
ckarg(1); n=ckintval(argv[0]);
56 return((islower(n))?
T:
NIL);}
62 {
ckarg(1); n=ckintval(argv[0]);
63 return((isalpha(n))?
T:
NIL);}
69 {
ckarg(1); n=ckintval(argv[0]);
70 return((isdigit(n))?
T:
NIL);}
76 {
ckarg(1); n=ckintval(argv[0]);
77 return((isalnum(n))?
T:
NIL);}
83 {
ckarg(1); n=ckintval(argv[0]);
84 return((islower(n))?(
makeint(toupper(n))):argv[0]);}
90 {
ckarg(1); n=ckintval(argv[0]);
91 return((isupper(n))?(
makeint(tolower(n))):argv[0]);}
97 {
register byte *str1, *str2;
98 int start1,end1,start2,end2;
102 start1=ckintval(argv[2]); end1=ckintval(argv[3]);
103 end1=
min(end1,vecsize(s1));
104 start2=ckintval(argv[4]); end2=ckintval(argv[5]);
105 end2=
min(end2,vecsize(s2));
107 if (len!=end2-start2)
return(
NIL);
108 str1= &s1->
c.
str.
chars[start1]; str2= &s2->c.str.chars[start2];
109 while (len-->0)
if (*str1++ != *str2++)
return(
NIL);
116 {
register byte *str1, *str2;
117 int start1,end1,start2,end2,ch1,ch2;
121 start1=ckintval(argv[2]); end1=ckintval(argv[3]); end1=
min(end1,vecsize(s1));
122 start2=ckintval(argv[4]); end2=ckintval(argv[5]); end2=
min(end2,vecsize(s2));
124 if (len!=end2-start2)
return(
NIL);
125 str1= &s1->
c.
str.
chars[start1]; str2= &s2->c.str.chars[start2];
127 ch1= *str1++; ch2= *str2++;
128 if (islower(ch1)) ch1=toupper(ch1);
129 if (islower(ch2)) ch2=toupper(ch2);
130 if (ch1!=ch2)
return(
NIL);}
pointer STR_GE(context *ctx, int n, argv)
pointer CHDOWNCASE(context *ctx, int n, argv)
pointer STR_LE(context *ctx, int n, argv)
pointer SETCHAR(context *ctx, int n, argv)
pointer DIGITP(context *ctx, int n, argv)
pointer STRINGEQ(context *ctx, int n, argv)
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
pointer STR_EQ(context *ctx, int n, argv)
pointer LOWCASEP(context *ctx, int n, argv)
pointer UPCASEP(context *ctx, int n, argv)
pointer CHUPCASE(context *ctx, int n, argv)
pointer STRINGEQUAL(context *ctx, int n, argv)
pointer ALNUMP(context *ctx, int n, argv)
charstring(context *ctx, pointer mod)
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
pointer ALPHAP(context *ctx, int n, argv)
pointer STR_GT(context *ctx, int n, argv)
pointer CHAR(context *ctx, int n, argv)
pointer STR_LT(context *ctx, int n, argv)