[Gllug] Website developement
David Freeman
freemadi at yahoo.co.uk
Sun Jul 15 21:37:50 UTC 2001
--- Stig Brautaset <stig at brautaset.org> wrote: > Nix
<nix at esperi.demon.co.uk> writes:
>
> > On Sat, 14 Jul 2001, David Freeman uttered the following:
> > > --- Stig Brautaset <stig at brautaset.org> wrote: > David Freeman
> > > <freemadi at yahoo.co.uk> writes:
<snip>
> >
> > This is one that they are not supposed to solve. The C preprocessor
> > can only sensibly handle C; any attempt to make it handle anything
> > else (like Makefiles, hello imake, or X resources files) is a
> > mistake.
> >
> > You will find oddities happening, like the string `i586' collapsing
> > to `1' in the expanded page;
>
> Yes, I am aware of that.
I thought part of being a hacker was being able to make things do what
they were never intended for?
> I do not often use defined C/C++ keywords on my webpage, so this
> problem is easily avoided by putting "#undef linux" (or whatever
> keyword you need to write) somewhere in the file included. Simple.
also if you have a ' in your text you get a small error on process,
fixed with a <!--'--> further down the line.
> And yes, other problems like having to use " instead of " in the
> source file, but you are supposed to do that anyway, so I really do
> not see it as a problem.
Haven't found that one yet.
> > it Just Won't Work like you want it to.
>
> Speak for yourself; it does *exactly* what I need.
<aol>me too</aol>
> > (In fact, as of GCC-3.0, it won't work at all; `cpp -traditional'
> will
> > work better than nothing --- that was kept working for the sake of
> > imake.)
>
> I have gcc 2.95.4 (how it relates to 3.0 I don't know, but it can't
> be
> *that* far off) and that works like a charm.
Again <aol>me too</aol>
> > Consider that transformation of a source file into tokens happens
> > *before* preprocessing; the preprocessor operates on a stream of C
> > tokens, *not* on text.
>
> Last time I checked, C is written using ascii characters; the same as
> english text.
Yes but the way a compiler works is by breaking it down into a number
of tokens or words. The preprocessor I think does this but doens't
check whats in them other than if they are preprocessor commands. thus
we get away with it.
> > If you want a generalized macro expander, use M4. It has many, many
> > advantages over cpp for this sort of thing;
>
> I agree that it might be a better solution for this task, but then I
> had to learn yet another tool. M4 is not something I have an interest
> in learning.
M4, maybe I will learn about this motorway one day but learning LISP is
enough right now, hence using C is fine.
> > Using make is fine. Using cpp is a horrible mistake.
>
> It works fine for me; it simplifies the making of my webpage, and
> htat
> is really all that I ask. In addition I get some experience with make
> and gcc, which I consider a plus.
<aol> me too</aol>
Thanks
D
> Cheers, Stig
> --
> 19:23:34 up 21:03, 4 users, load average: 0.11, 0.07, 0.02
>
> --
> Gllug mailing list - Gllug at linux.co.uk
> http://list.ftech.net/mailman/listinfo/gllug
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list