Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!uwvax!dogie.macc.wisc.edu!csd4.milw.wisc.edu!bionet!apple!ames!elroy.jpl.nasa.gov!cit-vax!news From: news@cit-vax.Caltech.Edu (Usenet netnews) Newsgroups: comp.mail.mh Subject: Re: mh on hp 9000 series Keywords: mh,hp,hp9000 Message-ID: <11238@cit-vax.Caltech.Edu> Date: 8 Jul 89 08:09:24 GMT References: <1909@zaphod.axion.bt.co.uk> Reply-To: andre@csvax.caltech.edu Organization: California Institute of Technology Lines: 233 --- From: andre@catfish.caltech.edu (Andre Burgoyne) Path: catfish!andre I had the same problem on our hp9000s350's. Turns out that lexstring.c does some things which don't agree with hp's lex. Here is a diff that works for me. Btw, this code is lifted from hp's version of mh 6.5, but it does work with 6.6. Andre' andre@csvax.caltech.edu ------ *** zotnet/tws/lexstring.c.O Thu Oct 29 15:03:39 1987 --- zotnet/tws/lexstring.c Mon Jan 23 20:08:47 1989 *************** *** 6,11 #define YYLMAX 256 struct yysvf { struct yywork *yystoff; struct yysvf *yyother; int *yystops; --- 6,12 ----- #define YYLMAX 256 struct yysvf { + #ifndef hpux struct yywork *yystoff; #else hpux int yystoff; *************** *** 7,12 struct yysvf { struct yywork *yystoff; struct yysvf *yyother; int *yystops; }; --- 8,16 ----- struct yysvf { #ifndef hpux struct yywork *yystoff; + #else hpux + int yystoff; + #endif hpux struct yysvf *yyother; int *yystops; }; *************** *** 46,51 if(debug) fprintf(stderr,"state %d\n",state-yysvec-1); # endif tran = state->yystoff; if(tran == yycrank) /* may not be any transitions */ --- 50,56 ----- if(debug) fprintf(stderr,"state %d\n",state-yysvec-1); # endif + #ifndef hpux tran = state->yystoff; #else hpux tran = &yycrank[state->yystoff]; *************** *** 47,52 fprintf(stderr,"state %d\n",state-yysvec-1); # endif tran = state->yystoff; if(tran == yycrank) /* may not be any transitions */ if (state->yyother == 0 || --- 52,60 ----- # endif #ifndef hpux tran = state->yystoff; + #else hpux + tran = &yycrank[state->yystoff]; + #endif hpux if(tran == yycrank) /* may not be any transitions */ if (state->yyother == 0 || *************** *** 50,55 if(tran == yycrank) /* may not be any transitions */ if (state->yyother == 0 || state->yyother->yystoff == yycrank) break; --- 58,64 ----- if(tran == yycrank) /* may not be any transitions */ if (state->yyother == 0 || + #ifndef hpux state->yyother->yystoff == yycrank) #else hpux state->yyother->yystoff == 0) *************** *** 51,56 /* may not be any transitions */ if (state->yyother == 0 || state->yyother->yystoff == yycrank) break; ch = *cp++; --- 60,68 ----- if (state->yyother == 0 || #ifndef hpux state->yyother->yystoff == yycrank) + #else hpux + state->yyother->yystoff == 0) + #endif hpux break; ch = *cp++; *************** *** 66,71 putchar('\n'); } # endif if ( tran > yycrank){ tran += ch; if (tran <= yytop && tran->verify+yysvec == state){ --- 78,84 ----- putchar('\n'); } # endif + #ifndef hpux if ( tran > yycrank){ #else hpux if ( (int)tran > (int)yycrank){ *************** *** 67,72 } # endif if ( tran > yycrank){ tran += ch; if (tran <= yytop && tran->verify+yysvec == state){ if ((state = tran->advance+yysvec) == YYLERR){ --- 80,88 ----- # endif #ifndef hpux if ( tran > yycrank){ + #else hpux + if ( (int)tran > (int)yycrank){ + #endif hpux tran += ch; if (tran <= yytop && tran->verify+yysvec == state){ if ((state = tran->advance+yysvec) == YYLERR){ *************** *** 78,83 goto contin; } } else if(tran < yycrank) { /* r < yycrank */ tran = yycrank+(yycrank-tran) + ch; --- 94,100 ----- goto contin; } + #ifndef hpux } else if(tran < yycrank) { #else hpux } else if( (int)tran < (int)yycrank) { *************** *** 79,84 } } else if(tran < yycrank) { /* r < yycrank */ tran = yycrank+(yycrank-tran) + ch; # ifdef LEXDEBUG --- 96,104 ----- #ifndef hpux } else if(tran < yycrank) { + #else hpux + } else if( (int)tran < (int)yycrank) { + #endif hpux /* r < yycrank */ tran = yycrank+(yycrank-tran) + ch; # ifdef LEXDEBUG *************** *** 111,116 } } if ((state = state->yyother) && (tran = state->yystoff) != yycrank){ # ifdef LEXDEBUG if(debug) --- 131,137 ----- } } if ((state = state->yyother) && + #ifndef hpux (tran = state->yystoff) != yycrank){ #else hpux (tran = &yycrank[state->yystoff]) != yycrank){ *************** *** 112,117 } if ((state = state->yyother) && (tran = state->yystoff) != yycrank){ # ifdef LEXDEBUG if(debug) fprintf(stderr,"fall back to state %d\n", --- 133,141 ----- if ((state = state->yyother) && #ifndef hpux (tran = state->yystoff) != yycrank){ + #else hpux + (tran = &yycrank[state->yystoff]) != yycrank){ + #endif hpux # ifdef LEXDEBUG if(debug) fprintf(stderr,"fall back to state %d\n",