cc3200: Move stoupper to ftp.c and define in terms of unichar_toupper.
ftp.c is the only user of this function so making it static in that file allows it to be inlined. Also, reusing unichar_toupper means we no longer depend on the C stdlib for toupper, saving about 300 bytes of code space.
This commit is contained in:
parent
465a604547
commit
29551ba566
@ -932,6 +932,13 @@ static void ftp_close_cmd_data (void) {
|
|||||||
ftp_close_filesystem_on_error ();
|
ftp_close_filesystem_on_error ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void stoupper (char *str) {
|
||||||
|
while (str && *str != '\0') {
|
||||||
|
*str = (char)unichar_toupper((int)(*str));
|
||||||
|
str++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static ftp_cmd_index_t ftp_pop_command (char **str) {
|
static ftp_cmd_index_t ftp_pop_command (char **str) {
|
||||||
char _cmd[FTP_CMD_SIZE_MAX];
|
char _cmd[FTP_CMD_SIZE_MAX];
|
||||||
ftp_pop_param (str, _cmd);
|
ftp_pop_param (str, _cmd);
|
||||||
|
@ -98,13 +98,6 @@ int main (void) {
|
|||||||
for ( ; ; );
|
for ( ; ; );
|
||||||
}
|
}
|
||||||
|
|
||||||
void stoupper (char *str) {
|
|
||||||
while (str && *str != '\0') {
|
|
||||||
*str = (char)toupper((int)(*str));
|
|
||||||
str++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// We need this when configSUPPORT_STATIC_ALLOCATION is enabled
|
// We need this when configSUPPORT_STATIC_ALLOCATION is enabled
|
||||||
void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer,
|
void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer,
|
||||||
StackType_t **ppxIdleTaskStackBuffer,
|
StackType_t **ppxIdleTaskStackBuffer,
|
||||||
|
@ -31,6 +31,3 @@ typedef unsigned int size_t;
|
|||||||
|
|
||||||
int printf(const char *fmt, ...);
|
int printf(const char *fmt, ...);
|
||||||
int snprintf(char *str, size_t size, const char *fmt, ...);
|
int snprintf(char *str, size_t size, const char *fmt, ...);
|
||||||
|
|
||||||
// Convenience function, defined in main.c.
|
|
||||||
void stoupper (char *str);
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user