HP3000-L Archives

December 2000, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Mon, 4 Dec 2000 15:08:24 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (21 lines)
Re:
>     strncpy(k,argv[1],sizeof(argv[1]));  /*  <=== note the difference! */

That sizeof is probably not what you want...it's the value 4, always.

Did you want, perhaps:

    i = strlen (argv [1]);
    memset(k,' ',sizeof(k));
    memcpy (k,argv[1],i);                /*  <=== note the difference!*/

Having done that, find that a length of 0 still doesn't work for
me.  If I change the FFINDBYKEY to be:

    FFINDBYKEY(ksm,k,0,i,0);

then it works.

Stan Sieler                                           [log in to unmask]
www.allegro.com/sieler/wanted/index.html          www.allegro.com/sieler

ATOM RSS1 RSS2