ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts  1.0
ESP8266ILI9341DisplayProject
stringsup.h
Go to the documentation of this file.
1 
23 #ifndef _STRINGSUP_H_
24 #define _STRINGSUP_H_
25 
26 // Named address space
27 #ifndef MEMSPACE
28 #define MEMSPACE
29 #endif
30 
31 // Weak attribute
32 #ifndef WEAK_ATR
33 #define WEAK_ATR __attribute__((weak))
34 #endif
35 
37 #undef isdigit
38 #undef isupper
39 #undef islower
40 #undef tolower
41 #undef toupper
42 
43 
44 /* stringsup.c */
45 MEMSPACE void sep ( void );
46 MEMSPACE int WEAK_ATR isdigit ( int c );
47 MEMSPACE int WEAK_ATR isupper ( int c );
48 MEMSPACE int WEAK_ATR islower ( int c );
49 MEMSPACE int WEAK_ATR tolower ( int c );
50 MEMSPACE int WEAK_ATR toupper ( int c );
51 MEMSPACE void *memchr ( const void *str , int c , size_t size );
52 MEMSPACE size_t WEAK_ATR strlen ( const char *str );
53 MEMSPACE WEAK_ATR char *strcpy ( char *dest , const char *src );
54 MEMSPACE WEAK_ATR char *strncpy ( char *dest , const char *src , size_t size );
55 MEMSPACE WEAK_ATR char *strcpy ( char *dest , const char *src );
56 MEMSPACE WEAK_ATR char *strcat ( char *dest , const char *src );
57 MEMSPACE WEAK_ATR char *strncat ( char *dest , const char *src , size_t max );
58 MEMSPACE void WEAK_ATR reverse ( char *str );
59 MEMSPACE void WEAK_ATR strupper ( char *str );
60 MEMSPACE void trim_tail ( char *str );
61 MEMSPACE char *skipspaces ( char *ptr );
62 MEMSPACE char *nextspace ( char *ptr );
63 MEMSPACE char *skipchars ( char *str , char *pat );
64 MEMSPACE int WEAK_ATR strcmp ( const char *str , const char *pat );
65 MEMSPACE int WEAK_ATR strncmp ( const char *str , const char *pat , size_t len );
66 MEMSPACE int WEAK_ATR strcasecmp ( const char *str , const char *pat );
67 MEMSPACE int WEAK_ATR strncasecmp ( const char *str , const char *pat , size_t len );
68 MEMSPACE int MATCH ( char *str , char *pat );
69 MEMSPACE int MATCHARGS ( char *str , char *pat , int min , int argc );
70 MEMSPACE int MATCHI ( char *str , char *pat );
71 MEMSPACE int MATCH_LEN ( char *str , char *pat );
72 MEMSPACE int MATCHI_LEN ( char *str , char *pat );
73 MEMSPACE int split_args ( char *str , char *argv [], int max );
74 MEMSPACE char *get_token ( char *str , char *token , int max );
75 MEMSPACE int token ( char *str , char *pat );
76 MEMSPACE int32_t get_value ( char *str );
77 MEMSPACE char *strnalloc ( char *str , int len );
78 MEMSPACE char *stralloc ( char *str );
79 
80 
81 
82 #endif
MEMSPACE int MATCH_LEN(char *str, char *pat)
Compare two strings limted to length of pattern.
Definition: stringsup.c:511
int int32_t
MEMSPACE int MATCH(char *str, char *pat)
Compare two strings.
Definition: stringsup.c:455
MEMSPACE size_t WEAK_ATR strlen(const char *str)
String Length.
Definition: stringsup.c:146
MEMSPACE char * stralloc(char *str)
Allocate space for string.
Definition: stringsup.c:774
MEMSPACE int WEAK_ATR islower(int c)
Definition: stringsup.c:80
MEMSPACE int WEAK_ATR isupper(int c)
Is a character upper case.
Definition: stringsup.c:64
MEMSPACE char * get_token(char *str, char *token, int max)
return next token
Definition: stringsup.c:628
MEMSPACE int32_t get_value(char *str)
get a number
Definition: stringsup.c:706
#define MEMSPACE
Definition: stringsup.h:28
MEMSPACE int WEAK_ATR strcasecmp(const char *str, const char *pat)
Compare two strings without case.
Definition: stringsup.c:410
MEMSPACE WEAK_ATR char * strncpy(char *dest, const char *src, size_t size)
copy a string of at most N characters
Definition: stringsup.c:179
MEMSPACE int split_args(char *str, char *argv[], int max)
Split string into arguments stored in argv[] We split source string into arguments Warning: source st...
Definition: stringsup.c:566
MEMSPACE char * nextspace(char *ptr)
Skip to first white space in a string - tabs and spaces.
Definition: stringsup.c:306
MEMSPACE char * skipspaces(char *ptr)
Skip white space in a string - tabs and spaces.
Definition: stringsup.c:289
MEMSPACE int token(char *str, char *pat)
Search for token in a string matching user pattern.
Definition: stringsup.c:671
MEMSPACE int WEAK_ATR tolower(int c)
Convert character to lower case, only if it is upper case.
Definition: stringsup.c:96
MEMSPACE WEAK_ATR char * strcat(char *dest, const char *src)
Append string.
Definition: stringsup.c:199
MEMSPACE char * skipchars(char *str, char *pat)
Skip characters defined in user string.
Definition: stringsup.c:328
MEMSPACE int WEAK_ATR strcmp(const char *str, const char *pat)
Compare two strings.
Definition: stringsup.c:362
MEMSPACE void WEAK_ATR strupper(char *str)
UPPERCASE a string.
Definition: stringsup.c:253
MEMSPACE void trim_tail(char *str)
Trim White space and control characters from end of string.
Definition: stringsup.c:271
#define WEAK_ATR
Definition: stringsup.h:33
MEMSPACE WEAK_ATR char * strcpy(char *dest, const char *src)
copy a string
Definition: stringsup.c:161
MEMSPACE WEAK_ATR char * strncat(char *dest, const char *src, size_t max)
Append string of at most N bytes from src.
Definition: stringsup.c:214
MEMSPACE void * memchr(const void *str, int c, size_t size)
find a character in a string of maximum size
Definition: stringsup.c:125
MEMSPACE void WEAK_ATR reverse(char *str)
Reverse a string in place Example: abcdef -> fedcba.
Definition: stringsup.c:231
MEMSPACE int WEAK_ATR strncasecmp(const char *str, const char *pat, size_t len)
Compare two strings without case maximum len bytes in size.
Definition: stringsup.c:432
MEMSPACE int WEAK_ATR toupper(int c)
Convert character to upper case, only if it is lower case.
Definition: stringsup.c:112
MEMSPACE int MATCHI_LEN(char *str, char *pat)
Compare two strings without case limted to length of pattern.
Definition: stringsup.c:537
MEMSPACE char * strnalloc(char *str, int len)
Allocate space for string with maximum size.
Definition: stringsup.c:750
MEMSPACE int MATCHI(char *str, char *pat)
Compare two strings without case.
Definition: stringsup.c:493
MEMSPACE int WEAK_ATR isdigit(int c)
test if a character is a digit
Definition: stringsup.c:48
MEMSPACE void sep(void)
undo any existing macros
Definition: stringsup.c:32
MEMSPACE int MATCHARGS(char *str, char *pat, int min, int argc)
Match two strings and compare argument index Display message if the number of arguments is too few...
Definition: stringsup.c:471
MEMSPACE int WEAK_ATR strncmp(const char *str, const char *pat, size_t len)
Compare two strings maximum len bytes in size.
Definition: stringsup.c:386