Changeset 1806 in kBuild
- Timestamp:
- Oct 9, 2008 5:34:29 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/read.c
r1797 r1806 2803 2803 { 2804 2804 char *eol; 2805 #ifdef KMK 2806 char *end; 2807 #endif 2805 2808 2806 2809 /* If there is nothing left in this buffer, return 0. */ … … 2812 2815 2813 2816 eol = ebuf->buffer = ebuf->bufnext; 2817 #ifdef KMK 2818 end = ebuf->bufstart + ebuf->size; 2819 #endif 2814 2820 2815 2821 while (1) … … 2820 2826 2821 2827 /* Find the next newline. At EOS, stop. */ 2828 #ifndef KMK 2822 2829 eol = p = strchr (eol , '\n'); 2830 #else 2831 p = (char *)memchr (eol, '\n', end - eol); 2832 assert (!memchr (eol, '\0', p != 0 ? p - eol : end - eol)); 2833 eol = p; 2834 #endif 2823 2835 if (!eol) 2824 2836 { 2837 2825 2838 ebuf->bufnext = ebuf->bufstart + ebuf->size + 1; 2826 2839 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.