[PLUG] Writing a simple editor in C on Linux...
Wayne E. Van Loon Sr.
wevl at pacifier.com
Mon Mar 9 16:13:49 UTC 2009
Michael Robinson wrote:
> On Sun, 2009-03-08 at 19:54 -0700, Michael Robinson wrote:
>
>> The code to empty out my linked list of lines is crashing.
>>
>> I'm having a heck of time finding this bug. It only happens
>> the third time I try to read a file. Using backtrace in gdb
>> tells me it is happening when I'm dumping the old list prior
>> to loading fresh lines into it. I get a sig abort and it is
>> always crashing on a free command.
>>
>> I realize without putting my code up that people are going to
>> have a hard time figuring this one out, though I wonder if
>> anyone has any idea how this third times the charm thing
>> is happening?
>>
>
> Something odd I've noticed, it's my function prototypes in one
> of my header files that crash the program when it tries to read
> them.
What?
Aren't the prototypes in the header files used only used by the
compiler? Maybe you have a name space / scope problem where you are
trying to use a reserved name - one already in use.
> Read my linklist.h header file without the function prototype
> lines, the program doesn't crash.
>
> My program is attached for those who are interested in looking.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
More information about the PLUG
mailing list