[OT?] write C program with UTF16LE

Adam Bozanich abozan01 at ccsf.edu
Mon Mar 15 02:44:39 PST 2004



On Mon, 15 Mar 2004, Adam Bozanich wrote:
>
>

Sorry, There is an error here.  fgets() reads the number you specify minus
one chars, then null terminates the string.  these lines:

>
>     char  delbuf[CHUNKSIZE];
>     char  chunks[CHUNKSIZE * MAX_CHUNK_COUNT];
>

Should be:

     char  delbuf[CHUNKSIZE + 1];
     char  chunks[CHUNKSIZE * MAX_CHUNK_COUNT + 1 ];

-Adam




More information about the freebsd-questions mailing list