strings.c File Reference

#include "frontier.h"
#include "standard.h"
#include "font.h"
#include "memory.h"
#include "quickdraw.h"
#include "strings.h"
#include "ops.h"
#include "resources.h"
#include "shell.rsrc.h"
#include "tablestructure.h"
#include "timedate.h"
#include "langinternal.h"
#include "byteorder.h"

Include dependency graph for strings.c:

Go to the source code of this file.

Defines

#define ctparseparams   4
#define hextoint(ch)   (isdigit(ch)? (ch - '0') : (getlower (ch) - 'a' + 10))
#define stringerrorlist   263
#define cs_utf8   BIGSTRING( "\xA5" "utf-8" )
#define cs_utf16   BIGSTRING( "\x06" "utf-16" )
#define cs_iso88591   BIGSTRING( "\xA0" "iso-8859-1" )
#define cs_macintosh   BIGSTRING( "\x09" "macintosh" )
#define checklower(c)   (flcase? (c) : getlower (c))

Functions

static boolean converttextencoding (Handle, Handle, const long, const long, long *)
static boolean getTextEncodingIDFromIANA (bigstring, long *)
boolean equalstrings (const bigstring bs1, const bigstring bs2)
boolean equaltextidentifiers (byte *string1, byte *string2, short len)
boolean equalidentifiers (const bigstring bs1, const bigstring bs2)
short comparestrings (bigstring bs1, bigstring bs2)
short compareidentifiers (bigstring bs1, bigstring bs2)
boolean stringlessthan (register bigstring bs1, register bigstring bs2)
boolean pushstring (bigstring bssource, bigstring bsdest)
boolean deletestring (bigstring bs, short ixdelete, short ctdelete)
boolean deletefirstchar (bigstring bs)
short popleadingchars (bigstring bs, byte ch)
short poptrailingchars (bigstring bs, byte ch)
boolean pushchar (byte ch, bigstring bs)
boolean pushspace (bigstring bs)
boolean pushlong (long num, bigstring bsdest)
boolean pushint (short num, bigstring bsdest)
boolean insertstring (bigstring bssource, bigstring bsdest)
boolean insertchar (byte ch, bigstring bsdest)
void midstring (bigstring bssource, short ix, short len, bigstring bsdest)
boolean textfindreplace (Handle hfind, Handle hreplace, Handle hsearch, boolean flreplaceall, boolean flunicase)
boolean stringfindreplace (bigstring bsfind, bigstring bsreplace, Handle hsearch, boolean flreplaceall, boolean flunicase)
boolean dropnonalphas (bigstring bs)
boolean streamdropnonalphas (handlestream *s)
boolean scanstring (byte ch, bigstring bs, short *ix)
boolean stringfindchar (byte ch, bigstring bs)
boolean stringreplaceall (char ch1, char ch2, bigstring bs)
boolean textlastword (ptrbyte ptext, long len, byte chdelim, bigstring bsdest)
boolean textfirstword (ptrbyte ptext, long len, byte chdelim, bigstring bsdest)
boolean textnthword (ptrbyte ptext, long len, long wordnum, byte chdelim, boolean flstrict, long *ixword, long *lenword)
long textcountwords (ptrbyte ptext, long lentext, byte chdelim, boolean flstrict)
boolean lastword (bigstring bssource, byte chdelim, bigstring bsdest)
void poplastword (bigstring bs, byte chdelim)
boolean firstword (bigstring bssource, byte chdelim, bigstring bsdest)
boolean nthword (bigstring bs, short wordnum, byte chdelim, bigstring bsword)
boolean nthfield (bigstring bs, short fieldnum, byte chdelim, bigstring bsfield)
short countwords (bigstring bs, byte chdelim)
boolean textcommentdelete (Handle x)
long langcommentdelete (byte chdelim, byte *ptext, long ct)
void commentdelete (byte chdelim, bigstring bs)
boolean whitespacechar (byte ch)
boolean poptrailingwhitespace (bigstring bs)
boolean firstsentence (bigstring bs)
void uppertext (ptrbyte ptext, long ctchars)
void lowertext (ptrbyte ptext, long ctchars)
void allupper (bigstring bs)
void alllower (bigstring bs)
boolean capitalizefirstchar (bigstring bs)
boolean isallnumeric (bigstring bs)
void filledstring (byte ch, short ct, bigstring bs)
void padwithzeros (bigstring bs, short len)
void copystring (const bigstring bssource, bigstring bsdest)
void copyptocstring (const bigstring bssource, char *sdest)
void copyctopstring (const char *ssource, bigstring bsdest)
void copyheapstring (hdlstring hsource, bigstring bsdest)
boolean pushheapstring (hdlstring hsource, bigstring bsdest)
void timedatestring (long ptime, bigstring bs)
void ellipsize (bigstring bs, short width)
void parsedialogstring (const bigstring bssource, ptrstring bs0, ptrstring bs1, ptrstring bs2, ptrstring bs3, bigstring bsresult)
boolean parsedialoghandle (Handle hsource, Handle h0, Handle h1, Handle h2, Handle h3)
boolean setparseparams (bigstring bs0, bigstring bs1, bigstring bs2, bigstring bs3)
void parseparamstring (bigstring bsparse)
void getstringresource (short resnum, bigstring bs)
void parsenumberstring (short listnum, short id, long number, bigstring bsparse)
void convertpstring (bigstring bs)
void convertcstring (bigstring bs)
long textpatternmatch (byte *ptext, long lentext, bigstring bsfind, boolean flunicase)
short patternmatch (bigstring bspattern, bigstring bs)
boolean addstrings (bigstring bs1, bigstring bs2, bigstring bsdest)
boolean subtractstrings (bigstring bs1, bigstring bs2, bigstring bsdest)
void ostypetostring (OSType type, bigstring bs)
boolean stringtoostype (bigstring bs, OSType *type)
boolean hexstringtonumber (bigstring bshex, long *n)
void bytestohexstring (ptrvoid pdata, long ctbytes, bigstring bshex)
void numbertohexstring (long number, bigstring bshex)
boolean bytestohex (Handle hbytes, Handle *hhex)
boolean hextobytes (Handle hhex, Handle *hbytes)
void kstring (long ctbytes, bigstring bs)
void dirtostring (tydirection dir, bigstring bs)
boolean stringtodir (bigstring bs, tydirection *dir)
boolean midinsertstring (bigstring bsinsert, bigstring bs, short ixinsert)
boolean replacestring (bigstring bsreplace, short ix, short ctreplace, bigstring bsinsert)
boolean stringaddcommas (bigstring bs)
boolean stringdeletechars (bigstring bs, char ch)
boolean assurelastchariscolon (bigstring bs)
static short getTextEncodingErrorNumFromOSCode (long osStatusCode)
static void setTextEncodingConversionError (const bigstring encIn, const bigstring encOut, long osStatusCode)
boolean isTextEncodingAvailable (bigstring bsEncodingName)
boolean convertCharset (Handle hString, Handle hresult, bigstring charsetIn, bigstring charsetOut)
boolean utf16toansi (Handle h, Handle hresult)
boolean utf8toansi (Handle h, Handle hresult)
boolean ansitoutf8 (Handle h, Handle hresult)
boolean ansitoutf16 (Handle h, Handle hresult)
boolean pullstringsuffix (bigstring bssource, bigstring bssuffix, unsigned char chsuffix)
boolean macromantoutf8 (Handle h, Handle hresult)
boolean utf8tomacroman (Handle h, Handle hresult)
void initstrings (void)

Variables

byte zerostring [] = "\0"
unsigned char lowercasetable [256]
static hdlstring parseparams [ctparseparams] = {nil, nil, nil, nil}
static hdlstring dirstrings [ctdirections]
static byte bshexprefix [] = STR_hexprefix
static byte bsellipses [] = "\x03..."


Define Documentation

#define checklower  )     (flcase? (c) : getlower (c))
 

Referenced by textpatternmatch().

#define cs_iso88591   BIGSTRING( "\xA0" "iso-8859-1" )
 

Definition at line 59 of file strings.c.

Referenced by ansitoutf16(), ansitoutf8(), utf16toansi(), and utf8toansi().

#define cs_macintosh   BIGSTRING( "\x09" "macintosh" )
 

Definition at line 60 of file strings.c.

Referenced by macromantoutf8(), and utf8tomacroman().

#define cs_utf16   BIGSTRING( "\x06" "utf-16" )
 

Definition at line 58 of file strings.c.

Referenced by ansitoutf16(), ansitoutf8(), utf16toansi(), and utf8toansi().

#define cs_utf8   BIGSTRING( "\xA5" "utf-8" )
 

Definition at line 57 of file strings.c.

Referenced by ansitoutf8(), macromantoutf8(), utf8toansi(), and utf8tomacroman().

#define ctparseparams   4
 

Definition at line 48 of file strings.c.

Referenced by parsedialoghandle(), parsedialogstring(), parseparamstring(), and setparseparams().

#define hextoint ch   )     (isdigit(ch)? (ch - '0') : (getlower (ch) - 'a' + 10))
 

Definition at line 50 of file strings.c.

Referenced by hexstringtonumber(), and hextobytes().

#define stringerrorlist   263
 

Definition at line 52 of file strings.c.


Function Documentation

boolean addstrings bigstring  bs1,
bigstring  bs2,
bigstring  bsdest
 

Definition at line 1920 of file strings.c.

References copystring(), and pushstring().

Here is the call graph for this function:

void alllower bigstring  bs  ) 
 

Definition at line 1138 of file strings.c.

References lowertext(), and stringlength.

Here is the call graph for this function:

void allupper bigstring  bs  ) 
 

Definition at line 1132 of file strings.c.

References stringlength, and uppertext().

Here is the call graph for this function:

boolean ansitoutf16 Handle  h,
Handle  hresult
 

Definition at line 2897 of file strings.c.

References converttextencoding(), cs_iso88591, cs_utf16, gethandlesize(), sethandlesize(), and setTextEncodingConversionError().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

boolean ansitoutf8 Handle  h,
Handle  hresult
 

Definition at line 2843 of file strings.c.

References converttextencoding(), cs_iso88591, cs_utf16, cs_utf8, disposehandle(), gethandlesize(), newemptyhandle(), sethandlesize(), and setTextEncodingConversionError().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

boolean assurelastchariscolon bigstring  bs  ) 
 

Definition at line 2349 of file strings.c.

References pushchar().

Referenced by filespectopath().

Here is the call graph for this function:

boolean bytestohex Handle  hbytes,
Handle hhex
 

Definition at line 2109 of file strings.c.

References bshexprefix, ct, gethandlesize(), moveleft(), newhandle(), and stringlength.

Referenced by getvalueedittext().

Here is the call graph for this function:

void bytestohexstring ptrvoid  pdata,
long  ctbytes,
bigstring  bshex
 

Definition at line 2056 of file strings.c.

References bshexprefix, ct, insertstring(), lenbigstring, min, pushstring(), setemptystring, and setstringlength.

Referenced by hashgetvaluestring(), numbertohexstring(), and patterntostring().

Here is the call graph for this function:

boolean capitalizefirstchar bigstring  bs  ) 
 

Definition at line 1144 of file strings.c.

References stringlength.

void commentdelete byte  chdelim,
bigstring  bs
 

Definition at line 1009 of file strings.c.

References langcommentdelete(), setstringlength, and stringlength.

Here is the call graph for this function:

short compareidentifiers bigstring  bs1,
bigstring  bs2
 

Definition at line 242 of file strings.c.

References getlower, min, sgn, and stringlength.

Referenced by tablecomparenames().

short comparestrings bigstring  bs1,
bigstring  bs2
 

Definition at line 198 of file strings.c.

References min, sgn, and stringlength.

boolean convertCharset Handle  hString,
Handle  hresult,
bigstring  charsetIn,
bigstring  charsetOut
 

Definition at line 2701 of file strings.c.

References converttextencoding(), getTextEncodingIDFromIANA(), initCOM(), and setTextEncodingConversionError().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

void convertcstring bigstring  bs  ) 
 

Definition at line 1785 of file strings.c.

References moveright().

Referenced by ellipsize(), filespectopath(), hashinsertcstring(), num2str(), numbertostring(), parseerror(), TCPWRITEMSG(), windowgettitle(), and wpsetselectioninfo().

Here is the call graph for this function:

void convertpstring bigstring  bs  ) 
 

Definition at line 1769 of file strings.c.

References moveleft(), and short.

Referenced by ellipsize(), fwsNetEventReadStream(), revertdialog(), and wpsetfont().

Here is the call graph for this function:

static boolean converttextencoding Handle  ,
Handle  ,
const   long,
const   long,
long
[static]
 

Definition at line 2561 of file strings.c.

References disposehandle(), gethandlesize(), long, newemptyhandle(), noErr, NULL, pullfromhandle(), and sethandlesize().

Referenced by ansitoutf16(), ansitoutf8(), convertCharset(), macromantoutf8(), utf16toansi(), utf8toansi(), and utf8tomacroman().

Here is the call graph for this function:

void copyctopstring const char *  ssource,
bigstring  bsdest
 

Definition at line 1284 of file strings.c.

References memmove, and setstringlength.

Referenced by callprocwithparams(), closedunexpectedlyerror(), filefrompath(), filefunctionvalue(), fwsNetEventAddressDecode(), fwsNetEventAddressToName(), fwsNetEventStatusStream(), getapplicationfilespec(), getdaystring(), getmenuitem(), getmenutitle(), getsystemversionstring(), intneterror(), logtoaboutwindow(), logtodebugger(), neterror(), openwindowsparamlinefiles(), setmenuitemcommandkey(), userinfodialog(), and WinMain().

void copyheapstring hdlstring  hsource,
bigstring  bsdest
 

Definition at line 1318 of file strings.c.

References copystring(), h, nil, and setemptystring.

Here is the call graph for this function:

void copyptocstring const bigstring  bssource,
char *  sdest
 

Definition at line 1274 of file strings.c.

References memmove, and stringlength.

Referenced by alertdialog(), ccerrormessage(), chardialog(), DebugStr(), filespectopath(), FrontierFrameWndProc(), fwsNetEventAddressEncode(), fwsNetEventNameToAddress(), fwsNetEventOpenNameStream(), fwsNetEventWriteFileToStream(), getRegKeyBinary(), getRegKeyInfo(), getRegKeyLong(), getRegKeyString(), Insertmenuitem(), msgdialog(), Newmenu(), notifyuser(), playnamedsound(), ploticoncustom(), pushmenuitem(), replacevariabledialog(), savedialog(), setbuttonstring(), setmenuitem(), setmenuitemcommandkey(), setRegKeyBinary(), setRegKeyLong(), setRegKeyString(), setRegKeyValue(), threewaydialog(), twowaydialog(), winregdeletevalue(), winregdowrite(), and winreggethandlevalue().

void copystring const bigstring  bssource,
bigstring  bsdest
 

Definition at line 1228 of file strings.c.

References moveleft(), nil, setemptystring, setstringlength, and stringlength.

Here is the call graph for this function:

short countwords bigstring  bs,
byte  chdelim
 

Definition at line 876 of file strings.c.

References stringlength, and textcountwords().

Referenced by filefunctionvalue(), parsepageaddress(), stringtopoint(), stringtorect(), stringtorgb(), and teststringvalue().

Here is the call graph for this function:

boolean deletefirstchar bigstring  bs  ) 
 

Definition at line 341 of file strings.c.

References deletestring().

Here is the call graph for this function:

boolean deletestring bigstring  bs,
short  ixdelete,
short  ctdelete
 

Definition at line 305 of file strings.c.

References moveleft(), setstringlength, and stringlength.

Here is the call graph for this function:

void dirtostring tydirection  dir,
bigstring  bs
 

Definition at line 2206 of file strings.c.

References copyheapstring(), dirstrings, and dirtoindex().

Referenced by coercetostring().

Here is the call graph for this function:

boolean dropnonalphas bigstring  bs  ) 
 

Definition at line 591 of file strings.c.

References ct, deletestring(), isemptystring, and stringlength.

Referenced by indexpage().

Here is the call graph for this function:

void ellipsize bigstring  bs,
short  width
 

Definition at line 1408 of file strings.c.

References convertcstring(), convertpstring(), popclip(), pushemptyclip(), pushstring(), r, setstringlength, stringlength, and stringpixels().

Here is the call graph for this function:

boolean equalidentifiers const bigstring  bs1,
const bigstring  bs2
 

Definition at line 129 of file strings.c.

References ct, getlower, and stringlength.

boolean equalstrings const bigstring  bs1,
const bigstring  bs2
 

Definition at line 94 of file strings.c.

References ct, and stringlength.

boolean equaltextidentifiers byte string1,
byte string2,
short  len
 

Definition at line 118 of file strings.c.

References getlower.

Referenced by coercetofilespec(), and parseremotefunction().

void filledstring byte  ch,
short  ct,
bigstring  bs
 

Definition at line 1192 of file strings.c.

References setstringlength.

boolean firstsentence bigstring  bs  ) 
 

Definition at line 1055 of file strings.c.

References setstringlength, stringlength, and whitespacechar().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

boolean firstword bigstring  bssource,
byte  chdelim,
bigstring  bsdest
 

Definition at line 838 of file strings.c.

References stringlength, and textfirstword().

Here is the call graph for this function:

void getstringresource short  resnum,
bigstring  bs
 

Definition at line 1665 of file strings.c.

References copyheapstring(), nil, and setemptystring.

Here is the call graph for this function:

static short getTextEncodingErrorNumFromOSCode long  osStatusCode  )  [static]
 

Definition at line 2359 of file strings.c.

Referenced by setTextEncodingConversionError().

static boolean getTextEncodingIDFromIANA bigstring  ,
long
[static]
 

Definition at line 2469 of file strings.c.

References BIGSTRING, equalstrings(), initCOM(), long, lowertext(), noErr, NULL, and setTextEncodingConversionError().

Referenced by convertCharset(), and isTextEncodingAvailable().

Here is the call graph for this function:

boolean hexstringtonumber bigstring  bshex,
long n
 

Definition at line 2003 of file strings.c.

References alllower(), bigstring, bshexprefix, chspace, copystring(), fl, hextoint, i, min, popleadingchars(), stringdeletechars(), stringlength, and subtractstrings().

Referenced by nthint(), parsepopescapesequence(), parsepopnumber(), stringtolong(), and stringtopattern().

Here is the call graph for this function:

boolean hextobytes Handle  hhex,
Handle hbytes
 

Definition at line 2143 of file strings.c.

References ct, gethandlesize(), hextoint, and newhandle().

Referenced by tablegetwpedittext().

Here is the call graph for this function:

void initstrings void   ) 
 

Definition at line 3055 of file strings.c.

References bigstring, clearbytes(), ctdirections, directionlistnumber, dirstrings, getstringlist(), i, longsizeof, lowercasetable, newheapstring(), and parseparams.

Referenced by shellinit().

Here is the call graph for this function:

boolean insertchar byte  ch,
bigstring  bsdest
 

Definition at line 480 of file strings.c.

References lenbigstring, moveright(), setstringlength, and stringlength.

Here is the call graph for this function:

boolean insertstring bigstring  bssource,
bigstring  bsdest
 

Definition at line 456 of file strings.c.

References bigstring, copystring(), lenbigstring, pushstring(), and stringlength.

Here is the call graph for this function:

boolean isallnumeric bigstring  bs  ) 
 

Definition at line 1162 of file strings.c.

References ct, isnumeric, and stringlength.

Referenced by fileparsevolname(), findfirstnumericnodevisit(), findlastnumericnodevisit(), pathtofilespec(), stringtofloat(), stringtolong(), and xmlcompile().

boolean isTextEncodingAvailable bigstring  bsEncodingName  ) 
 

Definition at line 2547 of file strings.c.

References disablelangerror(), enablelangerror(), fl, and getTextEncodingIDFromIANA().

Referenced by isCharsetAvailableVerb().

Here is the call graph for this function:

void kstring long  ctbytes,
bigstring  bs
 

Definition at line 2194 of file strings.c.

References bigstring, getstringlist(), interfacelistnumber, kilobytestring, numbertostring(), and pushstring().

Here is the call graph for this function:

long langcommentdelete byte  chdelim,
byte ptext,
long  ct
 

Definition at line 929 of file strings.c.

References i.

Referenced by commentdelete(), and oplangtextvisit().

boolean lastword bigstring  bssource,
byte  chdelim,
bigstring  bsdest
 

Definition at line 822 of file strings.c.

References stringlength, and textlastword().

Here is the call graph for this function:

void lowertext ptrbyte  ptext,
long  ctchars
 

Definition at line 1118 of file strings.c.

References getlower.

Referenced by alllower(), getTextEncodingIDFromIANA(), innercasehandle(), lowercasehandle(), and stringfunctionvalue().

boolean macromantoutf8 Handle  h,
Handle  hresult
 

Definition at line 2984 of file strings.c.

References converttextencoding(), cs_macintosh, cs_utf8, and setTextEncodingConversionError().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

boolean midinsertstring bigstring  bsinsert,
bigstring  bs,
short  ixinsert
 

Definition at line 2247 of file strings.c.

References lenbigstring, moveleft(), moveright(), setstringlength, and stringlength.

Referenced by coercetofilespec(), hashreporterror(), midinsertchar(), replacestring(), stringaddcommas(), and xmlvaltostring().

Here is the call graph for this function:

void midstring bigstring  bssource,
short  ix,
short  len,
bigstring  bsdest
 

Definition at line 498 of file strings.c.

References moveleft(), setemptystring, and setstringlength.

Here is the call graph for this function:

boolean nthfield bigstring  bs,
short  fieldnum,
byte  chdelim,
bigstring  bsfield
 

Definition at line 858 of file strings.c.

References stringlength, textnthword(), and texttostring().

Here is the call graph for this function:

boolean nthword bigstring  bs,
short  wordnum,
byte  chdelim,
bigstring  bsword
 

Definition at line 844 of file strings.c.

References stringlength, textnthword(), and texttostring().

Referenced by arraytofrontiervalvisit(), hashreporterror(), isxmlmatch(), langfastaddresstotable(), namenomad(), nthint(), parsepageaddress(), stringtofloat(), structtofrontiervalvisit(), teststringvalue(), xmlgetname(), and xmlstructtofrontiervalue().

Here is the call graph for this function:

void numbertohexstring long  number,
bigstring  bshex
 

Definition at line 2085 of file strings.c.

References bytestohexstring().

Referenced by stringfunctionvalue(), and xcmdcallback().

Here is the call graph for this function:

void ostypetostring OSType  type,
bigstring  bs
 

Definition at line 1961 of file strings.c.

References longsizeof, moveleft(), and setstringlength.

Referenced by coercetostring(), drawline(), eventthreadmain(), filefunctionvalue(), findapplication(), getappmenurecord(), getostypedisplaystring(), handlerecordableevent(), hashgetsizestring(), langipcbuildparamlist(), langipccomplexsend(), langipcconvertaelist(), langipcerrormessage(), langipcfindtraphandler(), langostypeparamerror(), namefunc(), osahandletrapverb(), parsepopcharconst(), pusheventparameter(), setdialogostype(), and shellsave().

Here is the call graph for this function:

void padwithzeros bigstring  bs,
short  len
 

Definition at line 1212 of file strings.c.

References insertchar(), lenbigstring, and stringlength.

Here is the call graph for this function:

boolean parsedialoghandle Handle  hsource,
Handle  h0,
Handle  h1,
Handle  h2,
Handle  h3
 

Definition at line 1555 of file strings.c.

References assert, ctparseparams, gethandlesize(), i, inserthandleinhandle(), nil, and pullfromhandle().

Referenced by adddaynamesrow(), adddayrows(), glossarypatcherverb(), webserveraddtoerrorlog(), webserverbuilderrorpage(), and webservergetserverstring().

Here is the call graph for this function:

void parsedialogstring const bigstring  bssource,
ptrstring  bs0,
ptrstring  bs1,
ptrstring  bs2,
ptrstring  bs3,
bigstring  bsresult
 

Definition at line 1487 of file strings.c.

References assert, bigstring, copystring(), ctparseparams, nil, pushchar(), pushstring(), setemptystring, and stringlength.

Here is the call graph for this function:

void parsenumberstring short  listnum,
short  id,
long  number,
bigstring  bsparse
 

Definition at line 1684 of file strings.c.

References bigstring, getstringlist(), nil, numbertostring(), and parsedialogstring().

Referenced by hashgetvaluestring(), menuverbgetdisplaystring(), opverbgetsummitstring(), pictverbgetdisplaystring(), tableverbgetdisplaystring(), and wpverbgetdisplaystring().

Here is the call graph for this function:

void parseparamstring bigstring  bsparse  ) 
 

Definition at line 1645 of file strings.c.

References bigstring, copyheapstring(), ctparseparams, i, nil, parseparams, and setemptystring.

Here is the call graph for this function:

short patternmatch bigstring  bspattern,
bigstring  bs
 

Definition at line 1875 of file strings.c.

References i, and stringlength.

void poplastword bigstring  bs,
byte  chdelim
 

Definition at line 828 of file strings.c.

References bigstring, lastword(), setstringlength, and stringlength.

Here is the call graph for this function:

short popleadingchars bigstring  bs,
byte  ch
 

Definition at line 347 of file strings.c.

References deletestring(), i, and stringlength.

Referenced by findapplication(), getcommandkeystring(), hexstringtonumber(), nthint(), parsepopnumber(), and shelltgetmainmenu().

Here is the call graph for this function:

short poptrailingchars bigstring  bs,
byte  ch
 

Definition at line 372 of file strings.c.

References isemptystring, setstringlength, and stringlength.

Referenced by fwsNetEventAddressToName(), indexpage(), pathtofilespec(), tablesavesystemtable(), and tableverbinmemory().

boolean poptrailingwhitespace bigstring  bs  ) 
 

Definition at line 1030 of file strings.c.

References ct, setstringlength, stringlength, and whitespacechar().

Here is the call graph for this function:

boolean pullstringsuffix bigstring  bssource,
bigstring  bssuffix,
unsigned char  chsuffix
 

Definition at line 2937 of file strings.c.

References copystring(), ct, emptystring, fl, insertchar(), setstringlength, and stringlength.

Referenced by winregdelete(), winreggetvalue(), winreggetvaluelength(), winreggetvaluetype(), and winregwrite().

Here is the call graph for this function:

boolean pushchar byte  ch,
bigstring  bs
 

Definition at line 385 of file strings.c.

References lenbigstring, setstringlength, and stringlength.

boolean pushheapstring hdlstring  hsource,
bigstring  bsdest
 

Definition at line 1342 of file strings.c.

References fl, h, HLock, HUnlock, nil, and pushstring().

Here is the call graph for this function:

boolean pushint short  num,
bigstring  bsdest
 

Definition at line 426 of file strings.c.

References pushlong().

Here is the call graph for this function:

boolean pushlong long  num,
bigstring  bsdest
 

Definition at line 416 of file strings.c.

References bigstring, numbertostring(), and pushstring().

Here is the call graph for this function:

boolean pushspace bigstring  bs  ) 
 

Definition at line 406 of file strings.c.

References chspace, and pushchar().

Here is the call graph for this function:

boolean pushstring bigstring  bssource,
bigstring  bsdest
 

Definition at line 271 of file strings.c.

References lenbigstring, moveleft(), setstringlength, and stringlength.

Here is the call graph for this function:

boolean replacestring bigstring  bsreplace,
short  ix,
short  ctreplace,
bigstring  bsinsert
 

Definition at line 2272 of file strings.c.

References deletestring(), lenbigstring, midinsertstring(), and stringlength.

Here is the call graph for this function:

boolean scanstring byte  ch,
bigstring  bs,
short ix
 

Definition at line 629 of file strings.c.

References i, and stringlength.

boolean setparseparams bigstring  bs0,
bigstring  bs1,
bigstring  bs2,
bigstring  bs3
 

Definition at line 1610 of file strings.c.

References ctparseparams, disposehandle(), i, nil, and parseparams.

Referenced by kernelfunctionvalue(), oserror(), scriptgetwindowtitle(), setoserrorparam(), and shellinitmenus().

Here is the call graph for this function:

static void setTextEncodingConversionError const bigstring  encIn,
const bigstring  encOut,
long  osStatusCode
[static]
 

Definition at line 2379 of file strings.c.

References bigstring, getstringlist(), getTextEncodingErrorNumFromOSCode(), langerrormessage(), nil, parsedialogstring(), and stringerrorlist.

Referenced by ansitoutf16(), ansitoutf8(), convertCharset(), getTextEncodingIDFromIANA(), macromantoutf8(), utf16toansi(), utf8toansi(), and utf8tomacroman().

Here is the call graph for this function:

boolean streamdropnonalphas handlestream s  ) 
 

Definition at line 610 of file strings.c.

References nil, and pullfromhandlestream().

Referenced by dropnonalphasverb().

Here is the call graph for this function:

boolean stringaddcommas bigstring  bs  ) 
 

Definition at line 2289 of file strings.c.

References bigstring, commastring, getstringlist(), interfacelistnumber, midinsertstring(), and stringlength.

Referenced by stringfunctionvalue().

Here is the call graph for this function:

boolean stringdeletechars bigstring  bs,
char  ch
 

Definition at line 2317 of file strings.c.

References deletestring(), fl, i, and stringlength.

Referenced by hexstringtonumber(), nthint(), and stringtolong().

Here is the call graph for this function:

boolean stringfindchar byte  ch,
bigstring  bs
 

Definition at line 660 of file strings.c.

References scanstring().

Here is the call graph for this function:

boolean stringfindreplace bigstring  bsfind,
bigstring  bsreplace,
Handle  hsearch,
boolean  flreplaceall,
boolean  flunicase
 

Definition at line 567 of file strings.c.

References disposehandle(), fl, newtexthandle(), nil, and textfindreplace().

Referenced by neutermacros().

Here is the call graph for this function:

boolean stringlessthan register bigstring  bs1,
register bigstring  bs2
 

Definition at line 265 of file strings.c.

References comparestrings().

Here is the call graph for this function:

boolean stringreplaceall char  ch1,
char  ch2,
bigstring  bs
 

Definition at line 673 of file strings.c.

References scanstring().

Referenced by coercetofilespec(), and langerrordrawtext().

Here is the call graph for this function:

boolean stringtodir bigstring  bs,
tydirection dir
 

Definition at line 2219 of file strings.c.

References alllower(), bigstring, copyheapstring(), ctdirections, dirstrings, equalstrings(), i, and indextodir().

Referenced by stringtodirection(), and stringtolong().

Here is the call graph for this function:

boolean stringtoostype bigstring  bs,
OSType type
 

Definition at line 1976 of file strings.c.

References fl, moveleft(), and stringlength.

Referenced by clickersvisit(), filedialogverb(), getdialogostype(), getmenubarid(), getspecialfolderpath(), handlerexpectsnames(), langipcbuildsubroutineevent(), langipcconvertoplist(), langipcgetparamvisit(), langipcpushrecordparams(), langstringtoostype(), notifyappvisit(), and sysfunctionvalue().

Here is the call graph for this function:

boolean subtractstrings bigstring  bs1,
bigstring  bs2,
bigstring  bsdest
 

Definition at line 1935 of file strings.c.

References copystring(), deletestring(), patternmatch(), and stringlength.

Referenced by filespecsubtractvalue(), hexstringtonumber(), and stringtopattern().

Here is the call graph for this function:

boolean textcommentdelete Handle  x  ) 
 

Definition at line 882 of file strings.c.

References BIGSTRING, disposehandle(), longinfinity, newtexthandle(), searchhandle(), sethandlecontents(), and sethandlesize().

Referenced by commentdeleteverb(), and rundirectiveverb().

Here is the call graph for this function:

long textcountwords ptrbyte  ptext,
long  lentext,
byte  chdelim,
boolean  flstrict
 

Definition at line 801 of file strings.c.

References textnthword().

Referenced by countwords(), indexpage(), and stringfunctionvalue().

Here is the call graph for this function:

boolean textfindreplace Handle  hfind,
Handle  hreplace,
Handle  hsearch,
boolean  flreplaceall,
boolean  flunicase
 

Definition at line 516 of file strings.c.

References closehandlestream(), handlestream::eof, gethandlesize(), lockhandle(), mergehandlestreamdata(), openhandlestream(), handlestream::pos, searchhandle(), searchhandleunicase(), and unlockhandle().

Referenced by fillintemplate(), replaceallinhandle(), stringfindreplace(), stringmultiplereplace(), and stringreplaceverb().

Here is the call graph for this function:

boolean textfirstword ptrbyte  ptext,
long  len,
byte  chdelim,
bigstring  bsdest
 

Definition at line 713 of file strings.c.

References i.

Referenced by firstword(), htmlrundirective(), and oplangtextvisit().

boolean textlastword ptrbyte  ptext,
long  len,
byte  chdelim,
bigstring  bsdest
 

Definition at line 690 of file strings.c.

References i.

Referenced by lastword(), and stringfunctionvalue().

boolean textnthword ptrbyte  ptext,
long  len,
long  wordnum,
byte  chdelim,
boolean  flstrict,
long ixword,
long lenword
 

Definition at line 736 of file strings.c.

Referenced by explodeversion(), getnexttoken(), glossarypatcherverb(), grabnthfield(), indexpage(), nthfield(), nthfieldhandle(), nthword(), textcountwords(), webserverparsecookies(), webserverprocessfirstline(), and xmlgetpathaddress().

long textpatternmatch byte ptext,
long  lentext,
bigstring  bsfind,
boolean  flunicase
 

Definition at line 1804 of file strings.c.

References checklower, i, and stringlength.

Referenced by findinhandlestream(), glossarypatcherverb(), handlecontains(), isoutlinetext(), stripmarkup(), textsearch(), webserverparseheaders(), webserverprocessfirstline(), and winregpullhkeyfromtext().

void timedatestring long  ptime,
bigstring  bs
 

Definition at line 1360 of file strings.c.

References bigstring, getstringlist(), interfacelistnumber, pushstring(), timedateseperatorstring, timetodatestring(), and timetotimestring().

Referenced by coercetostring(), mrcalendargetmostrecentaddress(), mrcalendargetmostrecentdayverb(), mrcalendargetnextaddress(), and mrcalendargetnextdayverb().

Here is the call graph for this function:

void uppertext ptrbyte  ptext,
long  ctchars
 

Definition at line 1104 of file strings.c.

Referenced by allupper(), and stringfunctionvalue().

boolean utf16toansi Handle  h,
Handle  hresult
 

Definition at line 2736 of file strings.c.

References converttextencoding(), cs_iso88591, cs_utf16, error, gethandlesize(), NULL, pullfromhandle(), sethandlesize(), and setTextEncodingConversionError().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

boolean utf8toansi Handle  h,
Handle  hresult
 

Definition at line 2785 of file strings.c.

References converttextencoding(), cs_iso88591, cs_utf16, cs_utf8, disposehandle(), gethandlesize(), newemptyhandle(), NULL, pullfromhandle(), sethandlesize(), and setTextEncodingConversionError().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

boolean utf8tomacroman Handle  h,
Handle  hresult
 

Definition at line 3020 of file strings.c.

References converttextencoding(), cs_macintosh, cs_utf8, and setTextEncodingConversionError().

Referenced by stringfunctionvalue().

Here is the call graph for this function:

boolean whitespacechar byte  ch  ) 
 

Definition at line 1024 of file strings.c.

Referenced by firstsentence(), poptrailingwhitespace(), and poptrailingwhitespacehandle().


Variable Documentation

byte bsellipses[] = "\x03..." [static]
 

Definition at line 1405 of file strings.c.

byte bshexprefix[] = STR_hexprefix [static]
 

Definition at line 78 of file strings.c.

hdlstring dirstrings[ctdirections] [static]
 

Definition at line 76 of file strings.c.

Referenced by dirtostring(), initstrings(), and stringtodir().

unsigned char lowercasetable[256]
 

Definition at line 72 of file strings.c.

Referenced by initstrings().

hdlstring parseparams[ctparseparams] = {nil, nil, nil, nil} [static]
 

Definition at line 74 of file strings.c.

Referenced by initstrings(), parseparamstring(), and setparseparams().

byte zerostring[] = "\0"
 

Definition at line 70 of file strings.c.

Referenced by assignemptytag(), ccagentselectvisit(), coercetobinary(), evaltree(), evaluatewith(), getfileverb(), getsearchparams(), langerrordialog(), langerrordrawtext(), langpushwithtable(), newshellwindowinfo(), processscheduler(), scriptdebugger(), setwinvalue(), statsupdate(), stringfunctionvalue(), tabledroppasteroutine(), tablefunctionvalue(), xcmdcallback(), and xmlcompile().


Generated on Tue Jun 13 13:17:07 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6