- Timestamp:
- Oct 11, 2008 7:07:29 PM (16 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/expand.c
r1831 r1834 487 487 if (length < 0) 488 488 length = strlen (string); 489 else 490 MY_ASSERT_MSG (string + length == (p1 = memchr (string, '\0', length)) || !p1, ("len=%ld p1=%p %s\n", length, p1, line)); 489 491 490 492 /* Simple 1: Emptry string. */ … … 551 553 o = op; 552 554 p = begp; 555 assert (!memchr (variable_buffer + line_offset, '\0', o - variable_buffer + line_offset)); 553 556 break; 554 557 } … … 707 710 o = variable_buffer_output (o, "\0", 2); /* KMK: compensate for the strlen + 1 that was removed above. */ 708 711 *eolp = o - 2; 709 assert (strchr (variable_buffer + line_offset, '\0') == *eolp); 712 MY_ASSERT_MSG (strchr (variable_buffer + line_offset, '\0') == *eolp, 713 ("expected=%d actual=%d\nlength=%ld string=%.*s\n", 714 (int)(*eolp - variable_buffer + line_offset), (int)strlen(variable_buffer + line_offset), 715 length, (int)length, string)); 710 716 return (variable_buffer + line_offset); 711 717 } -
trunk/src/kmk/kbuild.c
r1832 r1834 50 50 #ifndef va_copy 51 51 # define va_copy(dst, src) do {(dst) = (src);} while (0) 52 #endif53 #ifdef _MSC_VER54 # define MY_INLINE _inline static55 #elif defined(__GNUC__)56 # define MY_INLINE static __inline__57 #else58 # define MY_INLINE static59 52 #endif 60 53 -
trunk/src/kmk/make.h
r1827 r1834 148 148 #ifndef CHAR_BIT 149 149 # define CHAR_BIT 8 150 #endif 151 152 #ifdef KMK 153 # ifdef _MSC_VER 154 # define MY_INLINE _inline static 155 # elif defined(__GNUC__) 156 # define MY_INLINE static __inline__ 157 # else 158 # define MY_INLINE static 159 # endif 160 #endif /* KMK */ 161 #if defined(CONFIG_WITH_VALUE_LENGTH) || defined(KMK) 162 # ifndef NDEBUG 163 # define MY_ASSERT_MSG(expr, printfargs) \ 164 do { if (!(expr)) { printf printfargs; assert(expr); } } while (0) 165 # else 166 # define MY_ASSERT_MSG(expr, printfargs) do { } while (0) 167 # endif 150 168 #endif 151 169
Note:
See TracChangeset
for help on using the changeset viewer.