i am using unix, but the two lines i added are ansi C and should port on
any compiler claiming to adhere to ansi C.  you could always try them
yourself without any of your additions just to be sure, but there's
nothing system-dependent about them.  i'd be rather shocked if they
didn't work, actually.

i understand the first error; it's because you're trying to use the "=="
operator with a string ("HTML"), which  you can't do in C.  that one
should go away once you drop the quotation marks.  if it doesn't then i
don't know why not.  perhaps you should try recompiling with the "remake
all" or "rebuild all" option?

i don't see the problem with your code right away, unless "result"
either isn't defined in a place where that call's function can see it or
isn't a pointer to char (which is what the errors suggest).  recordin,
too, may not be large enough (but that's not causing the compile
errors), though i'm not sure how much you're reading into it, either. 
my most recent analog-generated page is nearly 40,000 characters long.


  alex

Mike Avila wrote:
> 
> Good idea about the cut and paste of the errors.  I should have done that
> in the first place.  Apologies.
> -----
> Code ----------------------------------------------------------------------
> ----
> /*@@@@@ Modification by Avila */
>   if (op -> outopts.outstyle == "HTML")
>      {
>      if (rebuild == TRUE)
>           {
>            rebuild_files();
>           }
>      }
> /*@@@@@ End of Modification */
> -----
> Error ---------------------------------------------------------------------
> ----
> --------------------Configuration: Makefile - Win32
> Debug--------------------
> Compiling...
> analog.c
> d:\taa\log\programs\analog\source\analog.c(113) : warning C4047: '==' :
> 'int ' differs in levels of indirection from 'char [5]'
> rebuild.c
> d:\taa\log\programs\analog\source\rebuild.c(70) : warning C4047: '=' : 'int
> ' differs in levels of indirection from 'char *'
> d:\taa\log\programs\analog\source\rebuild.c(78) : warning C4047: '=' : 'int
> ' differs in levels of indirection from 'char *'
> d:\taa\log\programs\analog\source\rebuild.c(79) : error C2061: syntax error
> : identifier 'result'
> d:\taa\log\programs\analog\source\rebuild.c(79) : error C2059: syntax error
> : ')'
> Error executing cl.exe.
> 
> Analog.exe - 2 error(s), 3 warning(s)
> -----
> Comments ------------------------------------------------------------------
> ----
> When I click on the first error it points to
> 
> if (op -> outopts.outstyle == "HTML")
> 
> When I use HTML or OUT_HTML in place of "HTML" I get additional errors.
> 
> The second error is in my code which I have not got back to to correct.
> 
> result = strstr(recordin, "</BODY>" );
> 
> It doesn't like that and I have to change the syntax.
> 
> FYI: char recordin[25000];
> 
> THANKS for the patience and help.  Just a reminder.  Your code looks like
> UNIX code and this is Win32.  Any chance that is the problem?  C is
> supposed to be C but there might be a slight difference.  Just a thought.
> And remember that I am VERY rusty on my C so anything is possible.  If it
> looks bad to you it probably is bad!
> 
> Again, THANKS.
> 
> Mike
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of alex
> > Sent: Monday, January 04, 1999 5:42 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [analog-help] Re:
> >
> >
> > hmm.  the syntax i gave you should be fine on the left as well.  here's
> > what i did:
> >
> >   if (op -> outopts.outstyle != OUT_NONE)
> >     output(&(op -> outopts), op -> gooditems, op -> baditems, &(op ->
> > dman),
> >            op -> sizes, op -> miscopts.data, op -> miscopts.bytes,
> >            op -> miscopts.bytes7, op -> miscopts.granularity);
> > /* test code */
> > if (op -> outopts.outstyle == HTML)
> >    fprintf(stderr, "congrats\n");
> > /* end test code */
> >   my_exit(EXIT_SUCCESS);
> >   return(EXIT_SUCCESS);  /* just to stop compiler complaining */
> >
> > which gave me this:
> > cgi2:/usr/public/packages/analog > ./analog +C'OUTPUT HTML' > /dev/null
> > ./analog: Warning F: Failed to open logfile
> >   /export/home/webmastr/server-root/document-root/logs/access_log:
> > ignoring it
> >   (For help on all errors and warnings, see docs/errors.html)
> > ./analog: Warning R: Turning off empty Request Report
> > ./analog: Warning R: Turning off empty Directory Report
> > ./analog: Warning R: Turning off empty Referrer Report
> > ./analog: Warning R: Turning off empty Referring Site Report
> > congrats
> > cgi2:/usr/public/packages/analog >
> >
> > so it dereferenced "outstyle" fine and recognized the HTML choice to
> > print my cheesy "congrats" message.  if it's not working then either i'm
> > misunderstanding your problem or the problem isn't with that line.
> > either way, a cut-and-paste of the errors you're getting would help.
> >
> >
> >   alex
> >
> > Mike Avila wrote:
> > >
> > > The problem is the left side, not the right side of the if-test. The
> > > compiler does not like the redirection.  My C is too rusty to
> > figure out
> > > how to "re-engineer" the pointer format to make it work.
> > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED]
> > > > [mailto:[EMAIL PROTECTED]]On Behalf Of alex
> > > > Sent: Sunday, January 03, 1999 3:14 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [analog-help] Re:
> > > >
> > > >
> > > > try:
> > > >   if (op -> outopts.outstyle == HTML)
> > > >
> > > > (without your quotation marks).  HTML is defined in analhea2.h along
> > > > with ASCII and OUT_NONE.
> > > >
> > > >
> > > >   alex
> > > >
> > > > Mike Avila wrote:
> > > > >
> > > > > A few days ago I sent this request for help to the author
> > but have not
> > > > > received a response yet.  He is probably still in the
> > moving process or
> > > > > maybe analog-author is not working.  Is there anybody who
> > has seen the
> > > > > source code for analog.c that can help me?  It is at the end
> > > > of analog.c
> > > > > that I am trying to add the following code.
> > > > >
> > > > > Thanks.
> > > > >
> > > > >
> > > > -----------------------------------------------------------------
> > > > ----------
> > > > > ------
> > > > >
> > > > > I am having a problem trying to get compare to the output
> > type so I can
> > > > > know whether or not to execute the module I created.  Would
> > > > you please help
> > > > > me by providing the correct code to check the output type for HTML.
> > > > >
> > > > > /*@@@@@ Modification by Avila */
> > > > >   if (op -> outopts.outstyle == "HTML")  <<<<<<<<<<<<<<<<<<<<<<<<<<
> > > > >      {
> > > > >      if (rebuild == TRUE)
> > > > >           {
> > > > >            rebuild_files();
> > > > >           }
> > > > >      }
> > > > > /*@@@@@ End of Modification */
> > > > >   my_exit(EXIT_SUCCESS);
> > > > >   return(EXIT_SUCCESS);  /* just to stop compiler complaining */
> > > > >
> > > > > Thanks.  I appreciate the help.  I cannot figure this one out
> > > > by myself.
> > >
> > > --------------------------------------------------------------------
> > > This is the analog-help mailing list. To unsubscribe from this
> > > mailing list, send mail to [EMAIL PROTECTED]
> > > with "unsubscribe analog-help" in the main BODY OF THE MESSAGE.
> > > --------------------------------------------------------------------
> >
> > --
> > GeoCities Operations
> > _____________________________________
> > --------------------------------------------------------------------
> > This is the analog-help mailing list. To unsubscribe from this
> > mailing list, send mail to [EMAIL PROTECTED]
> > with "unsubscribe analog-help" in the main BODY OF THE MESSAGE.
> > --------------------------------------------------------------------
> >
> 
> --------------------------------------------------------------------
> This is the analog-help mailing list. To unsubscribe from this
> mailing list, send mail to [EMAIL PROTECTED]
> with "unsubscribe analog-help" in the main BODY OF THE MESSAGE.
> --------------------------------------------------------------------

-- 
GeoCities Operations
_____________________________________
--------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe analog-help" in the main BODY OF THE MESSAGE.
--------------------------------------------------------------------

Reply via email to