AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:
CFG:
PT:0
S:andy.sharp@lsi.com
RQ:
SSV:mhbs.lsil.com
NSV:
SSH:
R:<Larry.Scheer@lsi.com>
MAID:2
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/LSI/INBOX	0	DEC609CD0E54B2448DAF023C89AE9755E9275AC0@cosmail02.lsi.com
X-Sylpheed-End-Special-Headers: 1
Date: Wed, 2 Dec 2009 11:14:37 -0800
From: Andrew Sharp <andy.sharp@lsi.com>
To: "Scheer, Larry" <Larry.Scheer@lsi.com>
Subject: Re: How did you compile elog-munger.c?
Message-ID: <20091202111437.5eb4b8de@ripper.onstor.net>
In-Reply-To: <DEC609CD0E54B2448DAF023C89AE9755E9275AC0@cosmail02.lsi.com>
References: <DEC609CD0E54B2448DAF023C89AE9755E9275ABF@cosmail02.lsi.com>
	<20091202103945.2823d25d@ripper.onstor.net>
	<DEC609CD0E54B2448DAF023C89AE9755E9275AC0@cosmail02.lsi.com>
Organization: LSI
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Phew, man, somebody sure woke up on the wrong side of the bed this
morning.

On Wed, 2 Dec 2009 12:07:47 -0700 "Scheer, Larry"
<Larry.Scheer@lsi.com> wrote:

> Okay,  that was a wise ass answer that provided no useful help at
> all. 
> 
> I did try compiling it on ripper before I sent the email. That is why
> I sent you the message asking for assistance.
> 
> Here is what I get. No change from trying to compile it for 32bit.
> 
> [larrys@ripper bin]$ gcc elog-munger.c
> elog-munger.c: In function 'hunt_for_paren':
> elog-munger.c:56: error: case label does not reduce to an integer
> constant
> 
> Now have a cup of coffee, beer, prozac or whatever it takes to loose
> the attitude and let me know what I need to do to get this tool to
> compile.
> 
> Thanks in advance and have a nice day,
> 
> Larry
> 
> ________________________________________
> From: Andrew Sharp [andy.sharp@lsi.com]
> Sent: Wednesday, December 02, 2009 10:39 AM
> To: Scheer, Larry
> Subject: Re: How did you compile elog-munger.c?
> 
> a) don't compile it 32 bit
> b) see (a)
> 
> On Tue, 1 Dec 2009 20:08:14 -0700 "Scheer, Larry"
> <Larry.Scheer@lsi.com> wrote:
> 
> > Andy,
> >    When I try to compile elog-munger.c for a 32 bit system I get the
> > following compile error:
> >
> >  gcc -m32 elog-munger.c -o elog-munger32
> > elog-munger.c: In function 'hunt_for_paren':
> > elog-munger.c:56: error: case label does not reduce to an integer
> > constant
> >
> > How did you get this to compile?
> >
> > /*
> >  * this function helps eliminate false matches to macros who's names
> >  * begin with the macro we're looking for, but are not the macro
> >  * we're looking for. or false matches to the name of our macro
> >  * in a comment and whatnot.
> >  *
> >  * return 0 if this is indeed the macro we're looking for
> >  *
> >  */
> > int
> > hunt_for_paren(char *wstart, char *pat, char paren)
> > {
> >     char *a = &wstart[strlen(pat)];
> >
> >     /* quick optimization ~:^) */
> >     if (*a == '(') {
> >         return 0;
> >     }
> >
> >     while (*a && *a != paren) {
> >         switch (*a) {
> >             case ' ':
> >             case '\t':
> >                 a++;
> >             case paren:
> >                 continue;
> >             default:
> >                 return 1;
> >         }
> >     }
> >
> >     if (*a == paren) {
> >         return 0;
> >     }
> >
> >     /*
> >      * got to end of string with no paren!
> >      * opening paren of macro must be on same line, i guess...
> >      */
> >     return 1;
> > }
