stringverbs.c File Reference

#include "frontier.h"
#include "standard.h"
#include "memory.h"
#include "strings.h"
#include "ops.h"
#include "resources.h"
#include "lang.h"
#include "langinternal.h"
#include "langhtml.h"
#include "langsystem7.h"
#include "tablestructure.h"
#include "kernelverbs.h"
#include "kernelverbdefs.h"
#include "timedate.h"
#include "oplist.h"
#include "tableverbs.h"
#include "md5.h"

Include dependency graph for stringverbs.c:

Go to the source code of this file.

Defines

#define stringerrorlist   263
#define notimplementederror   1

Enumerations

enum  tystringtoken {
  deletefunc, insertfunc, popleadingfunc, poptrailingfunc,
  trimwhitespacefunc, popsuffixfunc, hassuffixfunc, midfunc,
  nthcharfunc, nthfieldfunc, countfieldsfunc, setwordcharfunc,
  getwordcharfunc, firstwordfunc, lastwordfunc, nthwordfunc,
  countwordsfunc, commentdeletefunc, firstsentencefunc, patternmatchfunc,
  hexfunc, timestringfunc, datestringfunc, uppercasefunc,
  lowercasefunc, filledstringfunc, addcommasfunc, replacefunc,
  replaceallfunc, lengthfunc, isalphafunc, isnumericfunc,
  ispunctuationfunc, processmacrosfunc, urldecodefunc, urlencodefunc,
  parseargsfunc, iso8859encodefunc, getgifheightwidthfunc, getjpegheightwidthfunc,
  wrapfunc, davenetmassagerfunc, parseaddressfunc, dropnonalphasfunc,
  padwithzerosfunc, ellipsizefunc, innercasefunc, urlsplitfunc,
  hashmd5func, latintomacfunc, mactolatinfunc, utf16toansifunc,
  utf8toansifunc, ansitoutf8func, ansitoutf16func, multiplereplaceallfunc,
  macromantoutf8func, utf8tomacromanfunc, convertcharsetfunc, ischarsetavailablefunc,
  ctstringverbs
}

Functions

long countleadingchars (Handle htext, byte ch)
void handlepopleadingchars (Handle htext, byte ch)
void handlepoptrailingchars (Handle htext, byte ch)
static void handletrimwhitespace (Handle htext)
static void handlepopsuffix (Handle h, byte ch)
static boolean handlehassuffix (Handle hsuffix, Handle h)
static boolean ellipsizehandle (Handle h, long maxlen)
static void fillstring (ptrvoid pfill, long ctfill, bigstring bsfill)
static boolean wordwraphandle (Handle htext)
static boolean daveNetMassager (short indentlen, short maxlinelen, Handle h, Handle *hmassaged)
static boolean getpositivelongvalue (hdltreenode hparam1, short pnum, long *x)
static boolean stringreplaceverb (hdltreenode hparam1, tyvaluerecord *vreturned, boolean flreplaceall)
static boolean commentdeleteverb (hdltreenode hp1, tyvaluerecord *v)
boolean parseaddress (Handle htext, tyvaluerecord *v)
static boolean parseaddressverb (hdltreenode hp1, tyvaluerecord *v)
static boolean dropnonalphasverb (hdltreenode hp1, tyvaluerecord *v)
static boolean padwithzerosverb (hdltreenode hp1, tyvaluerecord *v)
static boolean stringmultiplereplace (Handle h, hdlhashtable ht, boolean flunicase, bigstring bsstartstring, bigstring bsendstring)
static boolean stringmultiplereplaceallverb (hdltreenode hp, tyvaluerecord *v)
static void grabnthfield (Handle htext, long fieldnum, byte chdelim, Handle *hfield, boolean flstrict)
static void innercasehandle (Handle h)
static boolean urlsplit (Handle h, tyvaluerecord *vreturn)
void latintomac (Handle h)
void mactolatin (Handle h)
static boolean isCharsetAvailableVerb (hdltreenode hp1, tyvaluerecord *v)
static boolean stringfunctionvalue (short token, hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror)
boolean stringinitverbs (void)

Variables

static unsigned char latintomactable []
static unsigned char mactolatintable []
char chword = ' '


Define Documentation

#define notimplementederror   1
 

Definition at line 193 of file stringverbs.c.

#define stringerrorlist   263
 

Definition at line 192 of file stringverbs.c.


Enumeration Type Documentation

enum tystringtoken
 

Enumerator:
deletefunc 
insertfunc 
popleadingfunc 
poptrailingfunc 
trimwhitespacefunc 
popsuffixfunc 
hassuffixfunc 
midfunc 
nthcharfunc 
nthfieldfunc 
countfieldsfunc 
setwordcharfunc 
getwordcharfunc 
firstwordfunc 
lastwordfunc 
nthwordfunc 
countwordsfunc 
commentdeletefunc 
firstsentencefunc 
patternmatchfunc 
hexfunc 
timestringfunc 
datestringfunc 
uppercasefunc 
lowercasefunc 
filledstringfunc 
addcommasfunc 
replacefunc 
replaceallfunc 
lengthfunc 
isalphafunc 
isnumericfunc 
ispunctuationfunc 
processmacrosfunc 
urldecodefunc 
urlencodefunc 
parseargsfunc 
iso8859encodefunc 
getgifheightwidthfunc 
getjpegheightwidthfunc 
wrapfunc 
davenetmassagerfunc 
parseaddressfunc 
dropnonalphasfunc 
padwithzerosfunc 
ellipsizefunc 
innercasefunc 
urlsplitfunc 
hashmd5func 
latintomacfunc 
mactolatinfunc 
utf16toansifunc 
utf8toansifunc 
ansitoutf8func 
ansitoutf16func 
multiplereplaceallfunc 
macromantoutf8func 
utf8tomacromanfunc 
convertcharsetfunc 
ischarsetavailablefunc 
ctstringverbs 

Definition at line 196 of file stringverbs.c.


Function Documentation

static boolean commentdeleteverb hdltreenode  hp1,
tyvaluerecord v
[static]
 

Definition at line 753 of file stringverbs.c.

References disposehandle(), flnextparamislast, getexempttextvalue(), setheapvalue(), stringvaluetype, textcommentdelete(), and v.

Referenced by stringfunctionvalue().

Here is the call graph for this function:

long countleadingchars Handle  htext,
byte  ch
 

Definition at line 326 of file stringverbs.c.

References gethandlesize(), and i.

Referenced by handlepopleadingchars().

Here is the call graph for this function:

static boolean daveNetMassager short  indentlen,
short  maxlinelen,
Handle  h,
Handle hmassaged
[static]
 

Definition at line 550 of file stringverbs.c.

References BIGSTRING, bigstring, chreturn, equalstrings(), error, filledstring(), gethandlesize(), i, newemptyhandle(), pushstring(), pushtexthandle(), setstringlength, and setstringwithchar.

Referenced by stringfunctionvalue().

Here is the call graph for this function:

static boolean dropnonalphasverb hdltreenode  hp1,
tyvaluerecord v
[static]
 

Definition at line 851 of file stringverbs.c.

References closehandlestream(), flnextparamislast, getexempttextvalue(), openhandlestream(), setheapvalue(), streamdropnonalphas(), stringvaluetype, and v.

Referenced by stringfunctionvalue().

Here is the call graph for this function:

static boolean ellipsizehandle Handle  h,
long  maxlen
[static]
 

Definition at line 422 of file stringverbs.c.

References gethandlesize(), and sethandlesize().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

static void fillstring ptrvoid  pfill,
long  ctfill,
bigstring  bsfill
[static]
 

Definition at line 443 of file stringverbs.c.

References ct, moveleft(), and stringlength.

Referenced by stringfunctionvalue().

Here is the call graph for this function:

static boolean getpositivelongvalue hdltreenode  hparam1,
short  pnum,
long x
[static]
 

Definition at line 693 of file stringverbs.c.

References getlongvalue(), langerror(), and numbernotpositiveerror.

Referenced by stringfunctionvalue().

Here is the call graph for this function:

static void grabnthfield Handle  htext,
long  fieldnum,
byte  chdelim,
Handle hfield,
boolean  flstrict
[static]
 

Definition at line 1042 of file stringverbs.c.

References gethandlesize(), loadfromhandletohandle(), newemptyhandle(), and textnthword().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

static boolean handlehassuffix Handle  hsuffix,
Handle  h
[static]
 

Definition at line 416 of file stringverbs.c.

References gethandlesize(), longinfinity, and searchhandle().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

void handlepopleadingchars Handle  htext,
byte  ch
 

Definition at line 341 of file stringverbs.c.

References countleadingchars(), nil, and pullfromhandle().

Referenced by innercasehandle(), stringfunctionvalue(), and webserverparsecookies().

Here is the call graph for this function:

static void handlepopsuffix Handle  h,
byte  ch
[static]
 

Definition at line 397 of file stringverbs.c.

References gethandlesize(), and sethandlesize().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

void handlepoptrailingchars Handle  htext,
byte  ch
 

Definition at line 348 of file stringverbs.c.

References gethandlesize(), i, and sethandlesize().

Referenced by innercasehandle(), and stringfunctionvalue().

Here is the call graph for this function:

static void handletrimwhitespace Handle  htext  )  [static]
 

Definition at line 364 of file stringverbs.c.

References gethandlesize(), nil, pullfromhandle(), and sethandlesize().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

static void innercasehandle Handle  h  )  [static]
 

Definition at line 1147 of file stringverbs.c.

References gethandlesize(), handlepopleadingchars(), handlepoptrailingchars(), lockhandle(), lowertext(), moveleft(), and unlockhandle().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

static boolean isCharsetAvailableVerb hdltreenode  hp1,
tyvaluerecord v
[static]
 

Definition at line 1324 of file stringverbs.c.

References bigstring, flnextparamislast, getstringvalue(), and isTextEncodingAvailable().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

void latintomac Handle  h  ) 
 

Definition at line 1266 of file stringverbs.c.

References gethandlesize(), and latintomactable.

Referenced by stringfunctionvalue().

Here is the call graph for this function:

void mactolatin Handle  h  ) 
 

Definition at line 1295 of file stringverbs.c.

References gethandlesize(), and mactolatintable.

Referenced by stringfunctionvalue().

Here is the call graph for this function:

static boolean padwithzerosverb hdltreenode  hp1,
tyvaluerecord v
[static]
 

Definition at line 877 of file stringverbs.c.

References disposehandle(), error, flnextparamislast, getexempttextvalue(), gethandlesize(), getlongvalue(), moveright(), sethandlesize(), setheapvalue(), stringvaluetype, and v.

Referenced by stringfunctionvalue().

Here is the call graph for this function:

boolean parseaddress Handle  htext,
tyvaluerecord v
 

static boolean parseaddressverb hdltreenode  hp1,
tyvaluerecord v
[static]
 

Definition at line 838 of file stringverbs.c.

References flnextparamislast, getexempttextvalue(), parseaddress(), and v.

Referenced by stringfunctionvalue().

Here is the call graph for this function:

static boolean stringfunctionvalue short  token,
hdltreenode  hparam1,
tyvaluerecord vreturned,
bigstring  bserror
[static]
 

Definition at line 1339 of file stringverbs.c.

References addcommasfunc, ansitoutf16(), ansitoutf16func, ansitoutf8(), ansitoutf8func, BIGSTRING, bigstring, chword, commentdeletefunc, commentdeleteverb(), convertCharset(), convertcharsetfunc, countfieldsfunc, countwordsfunc, tyvaluerecord::data, datestringfunc, daveNetMassager(), davenetmassagerfunc, deletefunc, disposehandle(), dropnonalphasfunc, dropnonalphasverb(), ellipsizefunc, ellipsizehandle(), error, errornum, filledstringfunc, fillstring(), firstsentence(), firstsentencefunc, firstwordfunc, fl, flnextparamislast, tyvaluedata::flvalue, getcharvalue(), getdatevalue(), getexempttextvalue(), getgifheightwidthfunc, getgifheightwidthverb(), gethandlesize(), getintvalue(), getjpegheightwidthfunc, getjpegheightwidthverb(), getlongvalue(), getoptionalparamvalue(), getpositivelongvalue(), getreadonlytextvalue(), getstringvalue(), getwordcharfunc, grabnthfield(), handlehassuffix(), handlepopleadingchars(), handlepopsuffix(), handlepoptrailingchars(), handletrimwhitespace(), hashmd5func, hassuffixfunc, hexfunc, hsearch, innercasefunc, innercasehandle(), insertfunc, insertinhandle(), isalphafunc, ischarsetavailablefunc, isCharsetAvailableVerb(), isnumericfunc, iso8859encodefunc, iso8859encodeverb(), ispunctuationfunc, langcheckparamcount(), langgetparamcount(), lastwordfunc, latintomac(), latintomacfunc, lengthfunc, loadfromhandle(), lockhandle(), longinfinity, tyvaluedata::longvalue, lowercasefunc, lowertext(), macromantoutf8(), macromantoutf8func, mactolatin(), mactolatinfunc, MD5Final(), MD5Init(), MD5Update(), midfunc, min, multiplereplaceallfunc, newemptyhandle(), newfilledhandle(), newhandle(), newtexthandle(), notimplementederror, nthcharfunc, nthfieldfunc, nthwordfunc, numbertohexstring(), padwithzerosfunc, padwithzerosverb(), parseaddressfunc, parseaddressverb(), parseargsfunc, parseargsverb(), patternmatchfunc, popleadingfunc, popsuffixfunc, poptrailingfunc, processhtmlmacrosverb(), processmacrosfunc, replaceallfunc, replacefunc, searchhandle(), setbinaryvalue(), setbooleanvalue(), setcharvalue(), setheapvalue(), setlongvalue(), setstringlength, setstringvalue(), setwordcharfunc, stringaddcommas(), stringlength, stringmultiplereplaceallverb(), stringreplaceverb(), stringvaluetype, textcountwords(), textlastword(), timenow(), timestringfunc, timetodatestring(), timetotimestring(), trimwhitespacefunc, typeunknown, unlockhandle(), uppercasefunc, uppertext(), urldecodefunc, urldecodeverb(), urlencodefunc, urlencodeverb(), urlsplit(), urlsplitfunc, utf16toansi(), utf16toansifunc, utf8toansi(), utf8toansifunc, utf8tomacroman(), utf8tomacromanfunc, v, wordwraphandle(), wrapfunc, and zerostring.

Referenced by stringinitverbs().

Here is the call graph for this function:

boolean stringinitverbs void   ) 
 

Definition at line 2370 of file stringverbs.c.

References idstringverbs, loadfunctionprocessor(), and stringfunctionvalue().

Here is the call graph for this function:

static boolean stringmultiplereplace Handle  h,
hdlhashtable  ht,
boolean  flunicase,
bigstring  bsstartstring,
bigstring  bsendstring
[static]
 

Definition at line 918 of file stringverbs.c.

References bigstring, coercevalue(), copyvaluerecord(), disposehandle(), disposevaluerecord(), gethandlesize(), gethashkey, inserttextinhandle(), newtexthandle(), nil, tyhashnode::sortedlink, stringlength, stringvaluetype, textfindreplace(), and v.

Referenced by stringmultiplereplaceallverb().

Here is the call graph for this function:

static boolean stringmultiplereplaceallverb hdltreenode  hp,
tyvaluerecord v
[static]
 

Definition at line 978 of file stringverbs.c.

References BIGSTRING, bigstring, tyvaluerecord::data, disposehandle(), flnextparamislast, tyvaluedata::flvalue, getexempttextvalue(), getoptionalparamvalue(), gettablevalue(), initvalue(), pullstringvalue(), setbooleanvalue(), setheapvalue(), stringmultiplereplace(), stringvaluetype, and v.

Referenced by stringfunctionvalue().

Here is the call graph for this function:

static boolean stringreplaceverb hdltreenode  hparam1,
tyvaluerecord vreturned,
boolean  flreplaceall
[static]
 

Definition at line 709 of file stringverbs.c.

References BIGSTRING, tyvaluerecord::data, disposehandle(), flnextparamislast, tyvaluedata::flvalue, getexempttextvalue(), getoptionalparamvalue(), getreadonlytextvalue(), nil, setbooleanvalue(), setheapvalue(), stringvaluetype, and textfindreplace().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

static boolean urlsplit Handle  h,
tyvaluerecord vreturn
[static]
 

Definition at line 1193 of file stringverbs.c.

References gethandlesize(), langpushlisttext(), loadfromhandletohandle(), newemptyhandle(), nil, and opnewlist().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

static boolean wordwraphandle Handle  htext  )  [static]
 

Definition at line 464 of file stringverbs.c.

References chlinefeed, chtab, gethandlesize(), and moveleft().

Referenced by stringfunctionvalue().

Here is the call graph for this function:


Variable Documentation

char chword = ' '
 

Definition at line 322 of file stringverbs.c.

Referenced by stringfunctionvalue().

unsigned char latintomactable[] [static]
 

Definition at line 52 of file stringverbs.c.

Referenced by latintomac().

unsigned char mactolatintable[] [static]
 

Definition at line 123 of file stringverbs.c.

Referenced by mactolatin().


Generated on Tue Jun 13 15:31:16 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6