X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCutil.h;h=c939868a38534a09c5d277a12c5bb64ccc314d62;hb=96286bdaf8e44243b1c4d26ecc357d15b65f087d;hp=6ac097d2cd018b306b65a18889fa260274329d13;hpb=bc52f6fd0d32e3a4098c106ae41e587187e40117;p=fw%2Fsdcc diff --git a/src/SDCCutil.h b/src/SDCCutil.h index 6ac097d2..c939868a 100644 --- a/src/SDCCutil.h +++ b/src/SDCCutil.h @@ -33,33 +33,24 @@ */ hTab *populateStringHash(const char **pin); -/** Given an array of string pointers and another string, adds the - string to the end of the list. The end of the list is assumed to - be the first NULL pointer. +/** Prints elements of the set to the file, each element on new line */ -void addToList (const char **list, const char *str); +void fputStrSet(FILE *fp, set *list); -/** Given an array of string pointers returns a string containing all - of the strings seperated by spaces. The returned string is on the - heap. The join stops when a NULL pointer is hit. +/** Prepend / append given strings to each item of string set. The result is in a + new string set. */ -char *join(const char **pplist); +set *appendStrSet(set *list, const char *pre, const char *post); -/** Given an array of string pointers, returns a string containing all - of the strings seperated by spaces. The returned string is on the - heap. n is the number of strings in the list. +/** Given a set returns a string containing all of the strings seperated + by spaces. The returned string is on the heap. */ -char *joinn(char **pplist, int n); +const char *joinStrSet(set *list); -/** Returns the characters in the path p2 past the last matching characters in - p1. Processes in a host dependent way. For example, on win32 the - test is case insensitive and treats '/' and '\' as the same. -*/ -char *getPathDifference (char *pinto, const char *p1, const char *p2); - -/** Given an array of string pointers, returns a string containing all - of the strings seperated by spaces. The returned string is on the - heap. n is the number of strings in the list. +/** Given a file with path information in the binary files directory, + returns the directory component. Used for discovery of bin + directory of SDCC installation. Returns NULL if the path is + impossible. */ char *getBinPath (const char *prel); @@ -71,7 +62,7 @@ void setMainValue (const char *pname, const char *pvalue); void populateMainValues (const char **ppin); -void buildCmdLine2 (char *pbuffer, const char *pcmd, size_t len); +void buildCmdLine2 (char *pbuffer, size_t len, const char *pcmd, ...); /** Returns true if sz starts with the string given in key. */ @@ -94,6 +85,15 @@ char *strncpyz(char *dest, const char *src, size_t n); */ char *strncatz(char *dest, const char *src, size_t n); +/* return SDCC build number */ +const char *getBuildNumber(void); + +/* convert a fixed16x16 type to double */ +double doubleFromFixed16x16(TYPE_UDWORD value); + +/* convert a double type to fixed16x16 */ +TYPE_UDWORD fixed16x16FromDouble(double value); + /* snprintf, by hook or by crook. */ size_t SDCCsnprintf(char *, size_t, const char *, ...); @@ -118,7 +118,4 @@ size_t SDCCsnprintf(char *, size_t, const char *, ...); # error "Need at least one of snprintf, vsnprintf, vsprintf!" # endif - - #endif -