OSDN Git Service

roast_std.h, roast_str.h Add.
authorunknown <Administrator@edge.(none)>
Thu, 31 May 2012 17:31:42 +0000 (02:31 +0900)
committerunknown <Administrator@edge.(none)>
Thu, 31 May 2012 17:31:42 +0000 (02:31 +0900)
include/_nouse/roast_bufsafe.h [moved from include/roast_bufsafe.h with 100% similarity]
include/_nouse/roast_std.h [new file with mode: 0644]
include/_nouse/roast_str.h [new file with mode: 0644]

diff --git a/include/_nouse/roast_std.h b/include/_nouse/roast_std.h
new file mode 100644 (file)
index 0000000..2f7503b
--- /dev/null
@@ -0,0 +1,28 @@
+/*     Roast+ License
+*/
+#ifndef __SFJP_ROAST_roast_std_H__
+#define __SFJP_ROAST_roast_std_H__
+
+#include "roast_common.h"
+
+#include "roast_bufsafe.h"
+#include "roast_file.h"
+#include "roast_memory.h"
+#include "roast_misc.h"
+#include "roast_str.h"
+
+
+/**** Macros *****************************************/
+
+
+
+
+/* ==== Functions ===================== */
+__ROAST_EXTERN_C_START
+
+void roast_sleep(unsigned long time_ms);
+
+__ROAST_EXTERN_C_END
+
+
+#endif/*__SFJP_ROAST_roast_std_H__*/
diff --git a/include/_nouse/roast_str.h b/include/_nouse/roast_str.h
new file mode 100644 (file)
index 0000000..fb1f1f9
--- /dev/null
@@ -0,0 +1,79 @@
+/*     Roast+ License v0.1
+*/
+#ifndef __SFJP_OPENMGL_roast_str_H__
+#define __SFJP_OPENMGL_roast_str_H__
+
+#include "roast_common.h"
+
+__ROAST_EXTERN_C_START
+
+/*=======================================================================*/
+
+
+char* roast_strccpy( char* to, const char* from, const char c );
+
+
+char* roast_strcncpy( char* to, const char* from, const char c, int n );
+
+
+char* roast_strchrrpc( char* buf, char from, char to );
+
+
+/*char* roast_strrpc1( char* buf, unsigned int bufsize, const char* find_str, const char* new_str );*/
+char* roast_strrpc2( char* outbuf, const char* inbuf, const char* find_str, const char* rpc_str );
+char* roast_safe_strrpc2( char* outbuf, unsigned int outbuf_size, const char* inbuf, const char* find_str, const char* rpc_str );
+/*char* roast_strrpc( char* outbuf, unsigned int outbuf_size, const char* inbuf, const char* find_str, const char* rpc_str );*/
+char* roast_safe_strrpc_bufshare( char* iobuf, unsigned int buf_size, const char* find_str, const char* rpc_str );
+char* roast_strrpc_toshort( char* iobuf, const char* find_str, const char* rpc_str );
+
+#define roast_strrpc(outbuf,inbuf,find_str,rpc_str)                                            roast_strrpc2(outbuf,inbuf,find_str,rpc_str)
+#define roast_safe_strrpc(outbuf,outbuf_size,inbuf,find_str,rpc_str)   roast_safe_strrpc2(outbuf,outbuf_size,inbuf,find_str,rpc_str)
+#define roast_strrpc_bufsmlr           roast_strrpc_toshort
+#define roast_strrpc_bufsmaller                roast_strrpc_toshort
+
+
+__ROAST_EXTERN_C_END
+
+
+/*=======================================================================*/
+
+#ifdef _ROAST_REMOVE_MACRO_NS
+
+       #define strccpy         roast_strccpy
+       #define strcncpy        roast_strcncpy
+       #define strrpc          roast_strrpc
+       
+#endif/*_ROAST_REMOVE_MACRO_NS*/
+
+
+
+/*     \8dÅ\8cã\82Ì\95\8e\9a\82ð\8eæ\93¾\82·\82é\83}\83N\83\8d      */
+/*#define ROAST_LAST_CHAR(s)           (*s == '\0' ? '\0' : s[strlen(s)-1] )*/
+#define ROAST_LAST_CHAR(s)                     (*s == '\0' ? s[0] : s[strlen(s)-1] )           /*      2009/09/12  \91ã\93ü\90æ\82Æ\82µ\82Ä\8ew\92è\82³\82ê\82½\8fê\8d\87\82É\82à\91Î\89\9e\81i\8bó\95\8e\9a\82È\82çs[0]\81j        */
+#define ROAST_GET_LAST_CHAR(s)         ROAST_LAST_CHAR(s)
+/*#define ROAST_GET_LAST_CHAR(s)       (*s == '\0' ? s[strlen(s)-1] : s[strlen(s)-1] ) */
+
+/*     \8dÅ\8cã\82Ì\95\8e\9a\82ð\8dí\8f\9c        */
+#define ROAST_REMOVE_LAST_CHAR(s)      ROAST_LAST_CHAR(s) = '\0'
+
+
+/*=======================================================================*/
+
+
+/*     roast__memrchr  */
+#ifdef ROAST_WIN32
+       void *roast__memrchr(const void *s, int c, size_t n);
+
+       #define roast_memrchr   roast__memrchr
+
+#else /* UNIX/Linux */
+       #define roast_memrchr   memrchr
+
+#endif
+
+
+
+/*\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡\81 \81¡*/
+
+
+#endif/*__SFJP_OPENMGL_roast_str_H__*/