On Mon, Oct 19, 2009 at 08:24:49PM -0700, Patrick Mahan wrote:
>
>
> Gary Kline wrote:
> >On Mon, Oct 19, 2009 at 11:09:19AM -0700, Patrick Mahan wrote:
> >>See comments interspaced below -
> >
> >
> > You've got it exactly right, Patrick. There were no "C" classes in
> > 1978--I taught
On Tue, Oct 20, 2009 at 05:42:41AM +0200, Polytropon wrote:
> Just a little and quite formal side note:
>
> On Mon, 19 Oct 2009 11:09:19 -0700, Patrick Mahan wrote:
> >while (*tp != '\0' && *tp++ != '<');
>
> It's often a good choice, especially for increasing readability
> of co
On Tue, Oct 20, 2009 at 05:42:41AM +0200, Polytropon wrote:
> Just a little and quite formal side note:
>
> On Mon, 19 Oct 2009 11:09:19 -0700, Patrick Mahan wrote:
> >while (*tp != '\0' && *tp++ != '<');
>
> It's often a good choice, especially for increasing readability
> of co
On Tue, Oct 20, 2009 at 05:08:40AM +0200, Polytropon wrote:
> On Mon, 19 Oct 2009 08:58:05 -0500, David Kelly wrote:
> > On Mon, Oct 19, 2009 at 05:43:44AM +0200, Polytropon wrote:
> > > to make sure s is not NULL, or testing for it explicitely like
> > >
> > > if(!s)
> > > ... error
On Mon, 19 Oct 2009 15:21:26 -0700, Gary Kline wrote:
> There were no "C" classes in 1978--I
> taught myself. Obviously, not that well because I have already dreaded
> pointers. ---Well, usually.
Don't mind. Just imagine my fun when trying to understand how
character string operat
Just a little and quite formal side note:
On Mon, 19 Oct 2009 11:09:19 -0700, Patrick Mahan wrote:
>while (*tp != '\0' && *tp++ != '<');
It's often a good choice, especially for increasing readability
of code, to code the "empty statement" on a line on its own (as
you usually put
Gary Kline wrote:
On Mon, Oct 19, 2009 at 11:09:19AM -0700, Patrick Mahan wrote:
See comments interspaced below -
Gary,
Let me restate your problem: You want to read through a file containing tags
delimited by "<>" and to skip these tags if the user has run your command
with
the "-N" flag.
On Mon, 19 Oct 2009 08:58:05 -0500, David Kelly wrote:
> On Mon, Oct 19, 2009 at 05:43:44AM +0200, Polytropon wrote:
> > to make sure s is not NULL, or testing for it explicitely like
> >
> > if(!s)
> > ... error handling here ...
>
> You are missing my point that *s == 0 is not
On Mon, Oct 19, 2009 at 11:09:19AM -0700, Patrick Mahan wrote:
> See comments interspaced below -
>
> Gary,
>
> Let me restate your problem: You want to read through a file containing tags
> delimited by "<>" and to skip these tags if the user has run your command
> with
> the "-N" flag.
>
> In
See comments interspaced below -
Gary Kline wrote:
On Mon, Oct 19, 2009 at 01:48:42AM -0400, Brad Mettee wrote:
Gary Kline wrote:
Guys,
maybe this can't be done reading in a file with fgets(buffer[128], fp),
then calling skiptags(), conditionally, to while () past ',' and '>'.
[snipped]
On Mon, Oct 19, 2009 at 01:48:42AM -0400, Brad Mettee wrote:
> Gary Kline wrote:
> >Guys,
> >
> >maybe this can't be done reading in a file with fgets(buffer[128], fp),
> >then calling skiptags(), conditionally, to while () past ',' and '>'.
> >
> >I know I need to calll skipTags with its address,
On Mon, Oct 19, 2009 at 04:19:11PM +0200, Erik Trulsson wrote:
> On Mon, Oct 19, 2009 at 09:03:22AM -0500, David Kelly wrote:
> > On Sun, Oct 18, 2009 at 11:30:49PM -0400, Robert Huff wrote:
> > >
> > > Glen Barber writes:
> > > >
> > > > "//" comments are recognized by both C and C++.
> > >
>
On Mon, Oct 19, 2009 at 09:03:22AM -0500, David Kelly wrote:
> On Sun, Oct 18, 2009 at 11:30:49PM -0400, Robert Huff wrote:
> >
> > Glen Barber writes:
> > >
> > > "//" comments are recognized by both C and C++.
> >
> > How about "... are recognized by both C++ and more recent versions
> >
On Sun, Oct 18, 2009 at 11:30:49PM -0400, Robert Huff wrote:
>
> Glen Barber writes:
> >
> > "//" comments are recognized by both C and C++.
>
> How about "... are recognized by both C++ and more recent versions
> of C."?
I think gcc++ and gcc use the same preprocessor? Comments are str
On Mon, Oct 19, 2009 at 05:43:44AM +0200, Polytropon wrote:
> On Sun, 18 Oct 2009 22:23:43 -0500, David Kelly wrote:
> > When not using a count to indicate how much data is in a char* you
> > should always test for null. Testing for null is not a sure fire way
> > to prevent buffer over runs b
Gary Kline wrote:
Guys,
maybe this can't be done reading in a file with fgets(buffer[128], fp),
then calling skiptags(), conditionally, to while () past ',' and '>'.
I know I need to calll skipTags with its address, skipTags(&buffer);, but then
how to i
handle the variable "s" in skipTags? An
On Mon, Oct 19, 2009 at 04:02:29AM +0200, Polytropon wrote:
> On Sun, 18 Oct 2009 18:33:43 -0700, Gary Kline wrote:
> > Guys,
> >
> > maybe this can't be done reading in a file with fgets(buffer[128], fp),
> > then calling skiptags(), conditionally, to while () past ',' and '>'.
> >
> > I know I
On Mon, Oct 19, 2009 at 05:43:44AM +0200, Polytropon wrote:
> On Sun, 18 Oct 2009 22:23:43 -0500, David Kelly wrote:
> > When not using a count to indicate how much data is in a char* you
> > should always test for null. Testing for null is not a sure fire way
> > to prevent buffer over runs b
On Sun, 18 Oct 2009 23:30:49 -0400, Robert Huff wrote:
>
> Glen Barber writes:
>
> > >> // redo, skip TAGS
> > >
> > > Is this C or C++ source code? I always thought // was C++
> > > specific...
> > >
> >
> > "//" comments are recognized by both C and C++.
>
> How about "... are r
On Sun, 18 Oct 2009 22:23:43 -0500, David Kelly wrote:
> When not using a count to indicate how much data is in a char* you
> should always test for null. Testing for null is not a sure fire way
> to prevent buffer over runs but its better than nothing.
There are means like
#include
Glen Barber writes:
> >> // redo, skip TAGS
> >
> > Is this C or C++ source code? I always thought // was C++
> > specific...
> >
>
> "//" comments are recognized by both C and C++.
How about "... are recognized by both C++ and more recent versions
of C."?
On Oct 18, 2009, at 8:33 PM, Gary Kline wrote:
Guys,
maybe this can't be done reading in a file with fgets(buffer[128],
fp),
then calling skiptags(), conditionally, to while () past ',' and '>'.
I know I need to calll skipTags with its address, skipTags
(&buffer);, but then how to i
hand
On Sun, Oct 18, 2009 at 10:02 PM, Polytropon wrote:
[snip]
>
>> // redo, skip TAGS
>
> Is this C or C++ source code? I always thought // was C++
> specific...
>
"//" comments are recognized by both C and C++.
--
Glen Barber
___
freebsd-questions@fre
On Sun, 18 Oct 2009 18:33:43 -0700, Gary Kline wrote:
> Guys,
>
> maybe this can't be done reading in a file with fgets(buffer[128], fp),
> then calling skiptags(), conditionally, to while () past ',' and '>'.
>
> I know I need to calll skipTags with its address, skipTags(&buffer);,
> but then h
24 matches
Mail list logo