FYI if someone is faced with doing something similar: 
I tweaked par.c, renamed as TextLines2Pdb.c, and put together the Vc6 and VC7.1 
project files. As David Williams describes it, par is a "Swiss Army Knife" 
whereas TextLines2Pdb has the narrow purpose that I was looking for which par 
doesn't do ... taking a text file comprised of lines and converting it into a 
multi-record .pdb file with one record per text line.

Here is a link. Note that it assumes you already have the par project, which 
has all the required .c and .h files to build libprc.lib. This .zip file only 
has the project files and the TextLines2Pdb.c file that has main.
http://www.berbible.org/misc/TextLines2Pdb.zip

Another caveat: the code assumes a Windows text file with CrLf delimiter. My 
impression is that Unix/Linux uses a single LF as a delimiter between text 
lines. There are some #define's related to rebuilding for Linux/Unix:
// Use 1 as DELIMITER_ADJ for CR-LF for Windows, 
//     0 for Unix/Linux (Mac?)
// OFFSET_TO_NEXT_LINE and LINE_DELIMITER are the 
//     same for Windows and Unix/Linux
#define DELIMITER_ADJ         (1)
#define LINE_DELIMITER        '\12'
#define OFFSET_TO_NEXT_LINE   (1)

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to