[plug] C help (only slightly Linux)
leonb at ami.com.au
Tue Jul 14 06:37:37 WST 1998
Shackleton, Kevin wrote:
> I have a project to program an HP200LX to read GPS data files that look
> like this:
> The main trouble I'm having is finding the best way to cut out the bits
> of data I want. In Pascal I'd do a copy() (which is a mid$() in Basic).
> P2C helpfully converted copy() to strsub(), which does not exist in
> Borland C.
strncpy (dest_char_array, source_char_array + start_offset,
Beware that this doesn't add the trailing null ('\0') if the string is
overlength (but there's probably one that does). Try also "man strncpy"
and read the see-alsos.
> Is anyone interested in a Borland C co-development (ie you do it, I take
> the credit), or can someone recommend a C book that deals with string
> handling - the couple I've got practically ignore this area.
"less /usr/include/string.h" and ignore all of the extern keywords, __P
Or post your problems here. (-:
More information about the plug