I've used txt2pdbdoc (uncompressed option) to translate a .txt file into .pdb format;
the file defines instructions for my application's VM to interpret/execute. On Linux,
I can read the original .txt file line by line; I need to emulate the same thing on
PalmOS. (Also, I need to identify all files of this type on the device...but maybe
another question.)
This may be a stupid question, but is there a relatively simple way to read each of
these "lines" into successive positions in an instruction_array[] of char*? The .pdb
file, minus header information, looks like the following:
0 get_card type action mode manual provides { timecard.status==blank } script { try
Accounting dept. if supervisor doesn't have timecards. }
1 enter_pay_period type action mode manual requires { timecard.status==blank }
provides { timecard.status==ready } agent { employee }
2 fill_hours type action mode manual requires { timecard.status==ready record_of_hours
} provides { timecard.status==filled } agent { employee }
3 fill_totals type action mode manual requires { timecard.status==filled calculator }
provides { timecard.status==totaled } agent { employee }
4 sign_card type action mode manual requires { timecard.status==totaled } agent {
employee } script { sign & date the timecard yourself. }
5 approve_card type action mode manual requires { timecard.status==totaled } provides
{ timecard.status==signed } agent { supervisor } script { get approval &
signature/date from supervisor. }
6 turn_in type action mode manual requires { timecard.status==signed } provides {
paycheck } agent { employee } script { turn in filled/totaled/signed/countersigned
timecard to the Accounting or HR dept. }
7 start
8 push 0
9 pop
10 call set ready get_card
11 jzero 79
12 pop
13 call wait done get_card
... {the rest is "assembly" instructions; from line 7 on}
Any suggestions would be greatly appreciated!
Mark Mastroieni
Computer Engineering, Santa Clara University
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/