X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Fscanstrbuf.h;h=a49a5f03541400ea08f2e16c42b14792d28b3246;hb=9b7c16ec4cbb5282642c377272224e3fc825f860;hp=9bd971441590ebcdef86cc680bad8fe5de9a62bf;hpb=ea50befaac9228edb2bab7f0bbf41881b4abc925;p=cc65 diff --git a/src/cc65/scanstrbuf.h b/src/cc65/scanstrbuf.h index 9bd971441..a49a5f035 100644 --- a/src/cc65/scanstrbuf.h +++ b/src/cc65/scanstrbuf.h @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 2002 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@cc65.org */ +/* (C) 2002-2009, Ullrich von Bassewitz */ +/* Roemerstrasse 52 */ +/* D-70794 Filderstadt */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ @@ -52,17 +52,27 @@ void SB_SkipWhite (StrBuf* B); /* Skip whitespace in the string buffer */ -int SB_GetSym (StrBuf* B, char* S); -/* Get a symbol from the string buffer. S must be able to hold MAX_IDENTLEN - * characters. Returns 1 if a symbol was found and 0 otherwise. +int SB_GetSym (StrBuf* B, StrBuf* Ident, const char* SpecialChars); +/* Get a symbol from the string buffer. If SpecialChars is not NULL, it + * points to a string that contains characters allowed within the string in + * addition to letters, digits and the underline. Note: The identifier must + * still begin with a letter. + * Returns 1 if a symbol was found and 0 otherwise but doesn't output any + * errors. */ int SB_GetString (StrBuf* B, StrBuf* S); -/* Get a string from the string buffer. S will be initialized by the function - * and will return the correctly terminated string on return. The function - * returns 1 if a string was found and 0 otherwise. +/* Get a string from the string buffer. Returns 1 if a string was found and 0 + * otherwise. Errors are only output in case of invalid strings (missing end + * of string). */ +int SB_GetNumber (StrBuf* B, long* Val); +/* Get a number from the string buffer. Accepted formats are decimal, octal, + * hex and character constants. Numeric constants may be preceeded by a + * minus or plus sign. The function returns 1 if a number was found and + * zero otherwise. Errors are only output for invalid numbers. + */