V25 with 64-bit support
[pforth] / csrc / pf_clib.c
index ac0beee..0299c3b 100644 (file)
 #ifdef PF_NO_CLIB\r
 /* Count chars until NUL.  Replace strlen() */\r
 #define  NUL  ((char) 0)\r
 #ifdef PF_NO_CLIB\r
 /* Count chars until NUL.  Replace strlen() */\r
 #define  NUL  ((char) 0)\r
-cell pfCStringLength( const char *s )\r
+cell_t pfCStringLength( const char *s )\r
 {\r
 {\r
-       cell len = 0;\r
+       cell_t len = 0;\r
        while( *s++ != NUL ) len++;\r
        return len;\r
 }\r
  \r
        while( *s++ != NUL ) len++;\r
        return len;\r
 }\r
  \r
-/*    void *memset (void *s, int32 c, size_t n); */\r
-void *pfSetMemory( void *s, cell c, cell n )\r
+/*    void *memset (void *s, cell_t c, size_t n); */\r
+void *pfSetMemory( void *s, cell_t c, cell_t n )\r
 {\r
 {\r
-       uint8 *p = s, byt = (uint8) c;\r
+       uint8_t *p = s, byt = (uint8_t) c;\r
        while( (n--) > 0) *p++ = byt;\r
        return s;\r
 }\r
 \r
        while( (n--) > 0) *p++ = byt;\r
        return s;\r
 }\r
 \r
-/*  void *memccpy (void *s1, const void *s2, int32 c, size_t n); */\r
-void *pfCopyMemory( void *s1, const void *s2, cell n)\r
+/*  void *memccpy (void *s1, const void *s2, cell_t c, size_t n); */\r
+void *pfCopyMemory( void *s1, const void *s2, cell_t n)\r
 {\r
 {\r
-       uint8 *p1 = s1;\r
-       const uint8 *p2 = s2;\r
+       uint8_t *p1 = s1;\r
+       const uint8_t *p2 = s2;\r
        while( (n--) > 0) *p1++ = *p2++;\r
        return s1;\r
 }\r
        while( (n--) > 0) *p1++ = *p2++;\r
        return s1;\r
 }\r