and [BUG] \X and \C fixed, \X still dorked
[p5sagit/p5-mst-13.2.git] / x2p / str.c
index 47dc9ec..2d44e2f 100644 (file)
--- a/x2p/str.c
+++ b/x2p/str.c
@@ -55,7 +55,7 @@ str_2num(register STR *str)
     str->str_nok = 1;
 #ifdef DEBUGGING
     if (debug & 32)
-       fprintf(stderr,"0x%lx num(%g)\n",(unsigned long)str,str->str_nval);
+       fprintf(stderr,"0x%lx num(%"NVgf")\n",(unsigned long)str,str->str_nval);
 #endif
     return str->str_nval;
 }
@@ -282,7 +282,7 @@ str_gets(register STR *str, register FILE *fp)
     if (str->str_len <= cnt)           /* make sure we have the room */
        GROWSTR(&(str->str_ptr), &(str->str_len), cnt+1);
     bp = str->str_ptr;                 /* move these two too to registers */
-    ptr = FILE_ptr(fp);
+    ptr = (STDCHAR*)FILE_ptr(fp);
     for (;;) {
        while (--cnt >= 0) {
            if ((*bp++ = *ptr++) == newline) {
@@ -296,7 +296,7 @@ str_gets(register STR *str, register FILE *fp)
        }
        
        FILE_cnt(fp) = cnt;             /* deregisterize cnt and ptr */
-       FILE_ptr(fp) = ptr;
+       FILE_ptr(fp) = (void*)ptr; /* LHS STDCHAR* cast non-portable */
        i = getc(fp);           /* get more characters */
        cnt = FILE_cnt(fp);
        ptr = FILE_ptr(fp);             /* reregisterize cnt and ptr */
@@ -316,7 +316,7 @@ str_gets(register STR *str, register FILE *fp)
 
 thats_all_folks:
     FILE_cnt(fp) = cnt;                        /* put these back or we're in trouble */
-    FILE_ptr(fp) = ptr;
+    FILE_ptr(fp) = (STDCHAR*)ptr;
     *bp = '\0';
     str->str_cur = bp - str->str_ptr;  /* set length */