From 8f8fa517cb7fd9b939d632ac93c40d04621a901f Mon Sep 17 00:00:00 2001 From: ache Date: Fri, 24 Jul 1998 13:23:19 +0000 Subject: Make it more 8bit clean --- textproc/word2x/files/patch-ab | 727 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 727 insertions(+) create mode 100644 textproc/word2x/files/patch-ab (limited to 'textproc/word2x') diff --git a/textproc/word2x/files/patch-ab b/textproc/word2x/files/patch-ab new file mode 100644 index 000000000000..76135ef9bae8 --- /dev/null +++ b/textproc/word2x/files/patch-ab @@ -0,0 +1,727 @@ +*** col-align.cc.old Fri Apr 11 00:16:44 1997 +--- col-align.cc Fri Jul 24 16:55:04 1998 +*************** +*** 40,46 **** + } + if (strlen(cdp)>(unsigned) max_wd[2]) + max_wd[2]=strlen(cdp); +! for (lt_sp=0, sc=cdp; isspace(*sc); sc++, lt_sp++) + { + if (*sc==CH_SUSPECT) + align_set=1; +--- 40,46 ---- + } + if (strlen(cdp)>(unsigned) max_wd[2]) + max_wd[2]=strlen(cdp); +! for (lt_sp=0, sc=cdp; isspace((unsigned char)*sc); sc++, lt_sp++) + { + if (*sc==CH_SUSPECT) + align_set=1; +*************** +*** 52,58 **** + { + if (*sc==CH_SUSPECT) + align_set=1; +! if (isspace(*sc)) + rt_sp++; + else + rt_sp=0; +--- 52,58 ---- + { + if (*sc==CH_SUSPECT) + align_set=1; +! if (isspace((unsigned char)*sc)) + rt_sp++; + else + rt_sp=0; +*** html-embed.cc.old Wed Apr 23 04:25:09 1997 +--- html-embed.cc Fri Jul 24 17:05:52 1998 +*************** +*** 83,89 **** + res=new(tblock); + while (inpadd("\\text{"); + if (flg) // If flag set then add everything up to scn +--- 215,221 ---- + * This section is meant to catch strings and render them nicely + * in a mbox. + */ +! if (islower((unsigned char)*inp) || isupper((unsigned char)*inp) || flg) + { + res->add("\\text{"); + if (flg) // If flag set then add everything up to scn +*************** +*** 228,239 **** + } + + flg=0; // Re-use flg +! while (inpadd("\\text{"); + if (flg) // If flag set then add everything up to scn +--- 389,395 ---- + * This section is meant to catch strings and render them nicely + * in a mbox. + */ +! if (islower((unsigned char)*inp) || isupper((unsigned char)*inp) || flg) + { + res->add("\\text{"); + if (flg) // If flag set then add everything up to scn +*************** +*** 402,413 **** + } + + flg=0; // Re-use flg +! while (inp0) ? "{" : "*{"); +! while(isspace(pt[i])) i++; + pt+=i; + do_add=1; + } +--- 392,398 ---- + op.add('\\'); + op.add(sects[unit]); + op.add((i>0) ? "{" : "*{"); +! while(isspace((unsigned char)pt[i])) i++; + pt+=i; + do_add=1; + } +*** reader.cc.old Tue Apr 21 04:21:55 1998 +--- reader.cc Fri Jul 24 17:05:52 1998 +*************** +*** 54,60 **** + { + if ((c=fgetc(in))==EOF) + break; +! if (c<' ' || c>126) + break; + } + if (i==ST_ASC_VCHARS) +--- 54,60 ---- + { + if ((c=fgetc(in))==EOF) + break; +! if (c<' ' || c==127) + break; + } + if (i==ST_ASC_VCHARS) +*************** +*** 107,113 **** + { + if ((c=fgetc(in))==EOF) + goto re_feed; +! if (c>=' ' && c<127) + asc++; + else + asc=0; +--- 107,113 ---- + { + if ((c=fgetc(in))==EOF) + goto re_feed; +! if (c>=' ' && c!=127) + asc++; + else + asc=0; +*************** +*** 421,427 **** + while (1) + { + /* Skip spaces */ +! while (isspace(*scan)) + scan++; + + /* Look for binary operator */ +--- 421,427 ---- + while (1) + { + /* Skip spaces */ +! while (isspace((unsigned char)*scan)) + scan++; + + /* Look for binary operator */ +*************** +*** 430,441 **** + { + /* skip spaces */ + scan++; +! while (isspace(*scan)) + scan++; + + /* Grab next word */ + blvl=0; +! while (!isspace(*scan) || blvl>0) + { + switch(*scan) + { +--- 430,441 ---- + { + /* skip spaces */ + scan++; +! while (isspace((unsigned char)*scan)) + scan++; + + /* Grab next word */ + blvl=0; +! while (!isspace((unsigned char)*scan) || blvl>0) + { + switch(*scan) + { +*************** +*** 478,484 **** + while (scan>=s) + { + /* Skip spaces */ +! while (scan>=s && isspace(*scan)) + scan--; + if (scan=s) + { + /* Skip spaces */ +! while (scan>=s && isspace((unsigned char)*scan)) + scan--; + if (scan=s && isspace(*scan)) + scan--; + if (scan0 ) + { + switch(*scan) + { +--- 489,502 ---- + { + /* skip spaces */ + scan--; +! while (scan>=s && isspace((unsigned char)*scan)) + scan--; + if (scan0 ) + { + switch(*scan) + { +*************** +*** 793,804 **** + int i,n; + + /* Determine initial number, if any */ +! if (!isdigit(txt[0])) + n=-1; + else + { + n=i=0; +! for (n=0, i=0; isdigit(txt[i]); i++) + n=n*10+txt[i]-'0'; + } + +--- 793,804 ---- + int i,n; + + /* Determine initial number, if any */ +! if (!isdigit((unsigned char)txt[0])) + n=-1; + else + { + n=i=0; +! for (n=0, i=0; isdigit((unsigned char)txt[i]); i++) + n=n*10+txt[i]-'0'; + } + +*************** +*** 818,824 **** + if (txt[0]=='a') + { + i=(txt[1]=='.') ? 2 : 1; +! if (isspace(txt[i])) + { + nl=new(struct list_info); + nl->list_type=LIST_ENUM_ALPHA; +--- 818,824 ---- + if (txt[0]=='a') + { + i=(txt[1]=='.') ? 2 : 1; +! if (isspace((unsigned char)txt[i])) + { + nl=new(struct list_info); + nl->list_type=LIST_ENUM_ALPHA; +*************** +*** 835,841 **** + if (txt[0]=='A') + { + i=(txt[1]=='.') ? 2 : 1; +! if (isspace(txt[i])) + { + nl=new(struct list_info); + nl->list_type=LIST_ENUM_ALPHA; +--- 835,841 ---- + if (txt[0]=='A') + { + i=(txt[1]=='.') ? 2 : 1; +! if (isspace((unsigned char)txt[i])) + { + nl=new(struct list_info); + nl->list_type=LIST_ENUM_ALPHA; +*************** +*** 951,962 **** + int i,n; + + /* Determine initial number. This will not change */ +! if (!isdigit(txt[0])) + n=-1; + else + { + n=i=0; +! for (n=0, i=0; isdigit(txt[i]); i++) + n=n*10+txt[i]-'0'; + } + +--- 951,962 ---- + int i,n; + + /* Determine initial number. This will not change */ +! if (!isdigit((unsigned char)txt[0])) + n=-1; + else + { + n=i=0; +! for (n=0, i=0; isdigit((unsigned char)txt[i]); i++) + n=n*10+txt[i]-'0'; + } + +*************** +*** 972,978 **** + { + if (txt[i]=='.') + i++; +! while (isspace(txt[i])) + i++; + if ((s=(char *) alloca(i+1))==NULL) + { +--- 972,978 ---- + { + if (txt[i]=='.') + i++; +! while (isspace((unsigned char)txt[i])) + i++; + if ((s=(char *) alloca(i+1))==NULL) + { +*************** +*** 1008,1014 **** + case LIST_BULLET: + if (txt[0]==lp->ldata.lbullet) + { +! for (i=0; (isspace(txt[i])); i++ ) ; + if ((s=(char *) alloca(2))==NULL) + { + fprintf(stderr, +--- 1008,1014 ---- + case LIST_BULLET: + if (txt[0]==lp->ldata.lbullet) + { +! for (i=0; (isspace((unsigned char)txt[i])); i++ ) ; + if ((s=(char *) alloca(2))==NULL) + { + fprintf(stderr, +*************** +*** 1029,1035 **** + t=new(tok)(T_ITEM, s, tok::TOK_START); + lp->last_item->enqueue(t); + +! while (isspace(*(++txt))); + t=new(tok)(T_PARAGRAPH, txt, tok::TOK_START); + lp->last_item->enqueue(t); + +--- 1029,1035 ---- + t=new(tok)(T_ITEM, s, tok::TOK_START); + lp->last_item->enqueue(t); + +! while (isspace((unsigned char)*(++txt))); + t=new(tok)(T_PARAGRAPH, txt, tok::TOK_START); + lp->last_item->enqueue(t); + +*************** +*** 1070,1077 **** + t=new(tok)(T_ITEM, s, tok::TOK_START); + lp->last_item->enqueue(t); + +! for (i=0; (!isspace(txt[i])); i++ ) ; +! for ( ;(isspace(txt[i])); i++) ; + t=new(tok)(T_PARAGRAPH, txt+i, tok::TOK_START); + lp->last_item->enqueue(t); + +--- 1070,1077 ---- + t=new(tok)(T_ITEM, s, tok::TOK_START); + lp->last_item->enqueue(t); + +! for (i=0; (!isspace((unsigned char)txt[i])); i++ ) ; +! for ( ;(isspace((unsigned char)txt[i])); i++) ; + t=new(tok)(T_PARAGRAPH, txt+i, tok::TOK_START); + lp->last_item->enqueue(t); + +*** wordwrap.cc.old Tue Apr 21 05:26:10 1998 +--- wordwrap.cc Fri Jul 24 16:55:05 1998 +*************** +*** 29,35 **** + { + /* FIXME: huge words might cause an oversize line */ + /* (this is not a typesetting program like *roff) */ +! if (isspace(*sc) || *sc=='\n' || *sc=='\0') + { + if (wlen+flg>croom) + { +--- 29,35 ---- + { + /* FIXME: huge words might cause an oversize line */ + /* (this is not a typesetting program like *roff) */ +! if (isspace((unsigned char)*sc) || *sc=='\n' || *sc=='\0') + { + if (wlen+flg>croom) + { +*** html-fmt.cc.bak Tue Apr 21 04:31:20 1998 +--- html-fmt.cc Fri Jul 24 17:15:39 1998 +*************** +*** 33,38 **** +--- 33,39 ---- + { 0xAE, "(R)" }, // reserved sign + { 0xB3, ">=" }, // Greater than or = came out as B3 + { 0xBB, ">>" }, // Closing >> quotes (28th element) ++ #if 0 + { 0xDF, "ß" }, // beta + { 0xE4, "&aumt;" }, // a with umlualt + { 0xE9, "è" }, // e grave?? +*************** +*** 40,45 **** +--- 41,47 ---- + { 0xF6, "&oumt" }, // o with umlualt + { 0xFA, "\\.u" }, // u with dot? + { 0xFC, "&uumt;" }, // u with umlualt. ++ #endif + }; + + tblock *__html_do_map(const char *s) -- cgit