crouch@crunchie.axion.bt.co.uk (the man whose head expanded) (07/06/89)
I've managed to get mh to run on our hp cluster; however we have a problem
with the scan command. Scan doesn't seem able to extract the dat from the
message, so when we type scan we get output such as:
6 00/01 To:crouch@axion.b starting getalias
^^^^^ This should be 07/06.
Has anyone seen this before or can suggest possible fixes.
Any help would be appreciated.
Regards,
Chris Rouch
--------------------------------------------------------------------------
crouch@axion.bt.co.uk RT3141, BTRL, Martlesham Heath, Ipswich
+44 473 646093
"A woman drove me to drink, and I didn't even have the courtesy to thank her"gregg@cbnewsc.ATT.COM (gregg.g.wonderly) (07/07/89)
From article <1909@zaphod.axion.bt.co.uk>, by crouch@crunchie.axion.bt.co.uk (the man whose head expanded): > I've managed to get mh to run on our hp cluster; however we have a problem > with the scan command. Scan doesn't seem able to extract the dat from the > message, so when we type scan we get output such as: > > 6 00/01 To:crouch@axion.b starting getalias > > ^^^^^ This should be 07/06. > > Has anyone seen this before or can suggest possible fixes. One problem that I am aware of with date processing is in ~mh/zotnet/tws/dtimep.lex. There are others there too when you do not pass it a strictly conforming date. change the lines near line 203 from [0-2]{d}{d}{d}{w} { tw.tw_hour = CVT2; tw.tw_min = CVT2; BEGIN Z; } to [0-2]{d}{d}{d}{w} { if (tw.tw_hour) { cp += 2; tw.tw_year = CVT2; tw.tw_zone = ZONE(-5 * 60); /* HACK, force EST */ } else { tw.tw_hour = CVT2; tw.tw_min = CVT2; BEGIN Z; } } Without seeing the exact date line that you are passing it, I can not say for sure, but this will certainly fix some problems. Particularly, this fixes the case where the date line does not have a Time Zone with it (it should, but some don't). -- ----- gregg.g.wonderly@att.com (AT&T bell laboratories)
seligman@polya.Stanford.EDU (Scott Seligman) (07/08/89)
In article <1909@zaphod.axion.bt.co.uk> crouch@axion.bt.co.uk writes: >I've managed to get mh to run on our hp cluster; however we have a problem >with the scan command. Scan doesn't seem able to extract the dat from the >message, so when we type scan we get output such as: > > 6 00/01 To:crouch@axion.b starting getalias > > ^^^^^ This should be 07/06. I had exactly the same problem. I fixed it by "lex"ing the file zotnet/tws/dtimep.lex on another system. It looks to me like lex on our 6.2 system was buggy. I haven't tried it under 6.5. Let me know if you'd like me to send you a working version of dtimep.c, the output of lex. Scott seligman@polya.stanford.edu
news@cit-vax.Caltech.Edu (Usenet netnews) (07/08/89)
---
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",mark@comp.vuw.ac.nz (Mark Davies) (07/09/89)
In article <10458@polya.Stanford.EDU> seligman@Polya.Stanford.EDU.Stanford.EDU (Scott Seligman) writes: -In article <1909@zaphod.axion.bt.co.uk> crouch@axion.bt.co.uk writes: ->I've managed to get mh to run on our hp cluster; however we have a problem ->with the scan command. Scan doesn't seem able to extract the dat from the ->message, so when we type scan we get output such as: -> 6 00/01 To:crouch@axion.b starting getalias -> ^^^^^ This should be 07/06. -I had exactly the same problem. I fixed it by "lex"ing the file -zotnet/tws/dtimep.lex on another system. It looks to me like -lex on our 6.2 system was buggy. I haven't tried it under -6.5. Let me know if you'd like me to send you a working version -of dtimep.c, the output of lex. I had the same problem on our 835 running HPUX 3.0, and fixed it the same way, by lexing it on another system. cheers mark -- Domainised: mark@comp.vuw.ac.nz Bang form: ...!uunet!vuwcomp!mark
neil@yc.estec.nl (Neil Dixon) (07/10/89)
Chris,
I seem to recall that the problem is a mismatch in the types
produced by lex, and the types in lexstring.c. I can't remember the
exact details but here's the patch.
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
# patch.neil
# This archive created: Mon Jul 10 09:32:53 1989
export PATH; PATH=/bin:$PATH
echo shar: extracting "'patch.neil'" '(2101 characters)'
if test -f 'patch.neil'
then
echo shar: will not over-write existing file "'patch.neil'"
else
sed 's/^ X//' << \SHAR_EOF > 'patch.neil'
XIndex: lexstring.c
XVersion: -r1.1/-r1.3
X*** /tmp/md526..1 Mon Jul 10 09:32:26 1989
X--- /tmp/md526..2 Mon Jul 10 09:32:26 1989
X***************
X*** 6,12 ****
X #define YYLMAX 256
X
X struct yysvf {
X! struct yywork *yystoff;
X struct yysvf *yyother;
X int *yystops;
X };
X--- 6,12 ----
X #define YYLMAX 256
X
X struct yysvf {
X! int yystoff;
X struct yysvf *yyother;
X int *yystops;
X };
X***************
X*** 24,30 ****
X extern char yyextra[];
X
X #ifdef LEXDEBUG
X! static int debug = 0;
X #endif LEXDEBUG
X
X lex_string( strptr, start_cond)
X--- 24,30 ----
X extern char yyextra[];
X
X #ifdef LEXDEBUG
X! static int debug = 1;
X #endif LEXDEBUG
X
X lex_string( strptr, start_cond)
X***************
X*** 46,56 ****
X if(debug)
X fprintf(stderr,"state %d\n",state-yysvec-1);
X # endif
X! tran = state->yystoff;
X if(tran == yycrank)
X /* may not be any transitions */
X if (state->yyother == 0 ||
X! state->yyother->yystoff == yycrank)
X break;
X
X ch = *cp++;
X--- 46,56 ----
X if(debug)
X fprintf(stderr,"state %d\n",state-yysvec-1);
X # endif
X! tran = &yycrank[state->yystoff];
X if(tran == yycrank)
X /* may not be any transitions */
X if (state->yyother == 0 ||
X! state->yyother->yystoff == 0)
X break;
X
X ch = *cp++;
X***************
X*** 80,86 ****
X
X } else if(tran < yycrank) {
X /* r < yycrank */
X! tran = yycrank+(yycrank-tran) + ch;
X # ifdef LEXDEBUG
X if (debug)
X fprintf(stderr,"compressed state\n");
X--- 80,86 ----
X
X } else if(tran < yycrank) {
X /* r < yycrank */
X! tran = yycrank + (yycrank - tran) + ch;
X # ifdef LEXDEBUG
X if (debug)
X fprintf(stderr,"compressed state\n");
X***************
X*** 111,117 ****
X }
X }
X if ((state = state->yyother) &&
X! (tran = state->yystoff) != yycrank){
X # ifdef LEXDEBUG
X if(debug)
X fprintf(stderr,"fall back to state %d\n",
X--- 111,117 ----
X }
X }
X if ((state = state->yyother) &&
X! (tran = &yycrank[state->yystoff]) != yycrank){
X # ifdef LEXDEBUG
X if(debug)
X fprintf(stderr,"fall back to state %d\n",
SHAR_EOF
if test 2101 -ne "`wc -c < 'patch.neil'`"
then
echo shar: error transmitting "'patch.neil'" '(should have been 2101 characters)'
fi
fi # end of overwriting check
# End of shell archive
exit 0
--
Neil Dixon <neil@yc.estec.nl> UUCP:...!mcvax!esatst!neil, BITNET: NDIXON@ESTEC
Thermal Control & Life Support Division (YC)
European Space Research and Technology Centre (ESTEC),
Noordwijk, The Netherlands.