diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/include/sched.h | 1 | ||||
-rw-r--r-- | src/common/include/string.h | 1 | ||||
-rw-r--r-- | src/common/include/tce/Folder_common.h | 10 | ||||
-rw-r--r-- | src/common/include/tce/Object_common.h | 10 | ||||
-rw-r--r-- | src/common/string.c | 7 |
5 files changed, 21 insertions, 8 deletions
diff --git a/src/common/include/sched.h b/src/common/include/sched.h index 0f8f8f4..1012116 100644 --- a/src/common/include/sched.h +++ b/src/common/include/sched.h @@ -7,6 +7,7 @@ #define MUTEX_UNLOCKED 0 //A mutex is just an uint32_t +typedef uint32_t mutex_t; int mutex_lock(uint32_t* mutex); //wait for mutex to be free int mutex_lockE(uint32_t* mutex); //lock mutex only if free, returns !0 if locked, 0 if was busy diff --git a/src/common/include/string.h b/src/common/include/string.h index a41459e..7d0bf20 100644 --- a/src/common/include/string.h +++ b/src/common/include/string.h @@ -6,7 +6,6 @@ int strlen(const char *str); char *strcpy(char *dest, const char *src); -// char *strdup(const char *src); // uses malloc, that's bad char *strchr(const char *str, char c); char *strcat(char *dest, const char *src); int strcmp(const char *s1, const char *s2); diff --git a/src/common/include/tce/Folder_common.h b/src/common/include/tce/Folder_common.h new file mode 100644 index 0000000..b1037dd --- /dev/null +++ b/src/common/include/tce/Folder_common.h @@ -0,0 +1,10 @@ +#ifndef DEF_TCE_FOLDER_H +#define DEF_TCE_FOLDER_H + +#define FILENAME_MAX_LEN 256 + +struct FolderMethods { + int GetChildNameAt; +}; + +#endif diff --git a/src/common/include/tce/Object_common.h b/src/common/include/tce/Object_common.h new file mode 100644 index 0000000..70a034e --- /dev/null +++ b/src/common/include/tce/Object_common.h @@ -0,0 +1,10 @@ +#ifndef DEF_OBJECT_U_H +#define DEF_OBJECT_U_H + +#define E_INVALID -2 +#define E_BAD_HANDLE -3 +#define E_NOT_IMPLEMENTED -4 +#define E_NOT_PUBLIC -5 +#define E_NOT_FOUND -6 + +#endif diff --git a/src/common/string.c b/src/common/string.c index 120fd5d..4c2dba8 100644 --- a/src/common/string.c +++ b/src/common/string.c @@ -20,13 +20,6 @@ char *strcpy(char *dest, const char *src) { return (char*)src; } -/*char *strdup(const char *src) { - char* ret = malloc(strlen(src) + 1); - if (ret == NULL) return ret; - strcpy(ret, src); - return ret; -}*/ - char *strcat(char *dest, const char *src) { char *dest2 = dest; dest2 += strlen(dest) - 1; |