par.man

来自「进行Palm开发时」· MAN 代码 · 共 411 行

MAN
411
字号
.TH PAR 1 "November 1999" "Version 0.5 (beta)" "Palm hacking commands".SH NAMEpar \- Palm database archiver, version 0.5..SH SYNOPSIS.B par t.I dbfile.PP.B par h.I dbfile.PP.B par x.I dbfile.BI [ ioptions ].BI [ records.. ].PP.B par\ c.BI [ hoptions ].I dbfile\ name\ type\ cid.BI [ ioptions ].BI [ files.. ].PP.B par u.BI [ hoptions ].I dbfile.BI [ ioptions ].BI [ updates.. ].PP.B par a.BI [ hoptions ].I dbfile.BI [ ioptions ].BI [ files.. ].PP.B par d.BI [ hoptions ].I dbfile.BI [ doptions ].BI [ records.. ].PP.B par V.SH DESCRIPTIONThe.B parutility creates and manipulates PalmOS database.B (.pdb)and resource.B (.prc)files. The first argument determines the mode of operation, as follows:.TP.B tList contents. For regular databases a list of records is generated,each line showing the record attributes, category, record size, andan ascii dump of the first few bytes of the record. For resource databases,a list of resources is generated, each line showing resource type, hex id,size, and ascii dump of the first few bytes of the resource..TP.B hList header information. A report of the database header is generated,showing the database name (this is the name that would be visible ona device), the database type, creator id, attributes, version, creationtime, last modification time, last backup time, mod number, nrecords(or resources), and the size of the application info block in the database..TP.B xExtract. The extract mode can extract all or just specific records from adatabase. With no further arguments, all records will be extracted fromthe database. If further arguments are provided, these should specify the.I indexof the record to extract for regular databases, and the.I typeand.I idof the desired resource for resource databases. By default,individual records will be saved as files with the name.IR <index>.pdr ,where.I <index>is the index of the record in the database, individual resourceswill be saved as files with the name.IR <type><id>.bin ,where.I <type>is the 4 character type of the resource, and<id>is the resource id in 4 digit hexadecimal. A preferred.I filenamefor a saved item can be specified for each record using the.B -foption to the record or resource specification..TP.B cCreate a new database. The create mode creates a new database file, withthe database.IR name ,.IR type ,and.I creator idspecified as (required) arguments. If no further arguments are specified,the resulting database will contain no records, but will have a validdatabase header. If further arguments are specified, they shouldspecify files to be appended to the database as records or resources (seethe.B -amode description)..TP.B uTouch the header or record attributes. In touch mode, changes to the databaseheader can be specified. By default, the last modification time willbe updated to the current time, but further changes can be specifiedusing the header options. See.B HEADER OPTIONSsection. In addition, attribute information for particular records canbe specified. For regular databases, the new record.I categoryand.I record attributesmay be specified, using the.B -cand.B -aoptions. The records to touch are specified by.IR index .For resource databases, the new resource.I typeand.I idmay be specified using the.B -Toption. The resources to touch are specified by.I <type>and.IR <id> ..TP.B aAppend records or resources. In append mode, records or resourceswill be added to the database. For regular databases, the target record.I categoryand.I record attributesmay be specified, using the.B -cand.B -aoptions before the source filename. For resource databases, thetarget resource.I typeand.I idmay be specified using the.B -Toption before the source filename. If the.B -Toption is not specified, the source filename is assumed tospecify the.I typeand.I idin the.I <type><index>fashion described for the.B xmode.In addition to individual records and resources,.B parcan append whole databases, in effect merging the records or resourcesfrom one database into another. Databases may be specified as appenditems explicitly using the.B -pargument option, or implicitly by using a.I .pdbextension for record databases, and.I .prcextension for resource databases..TP.B dDelete. In delete mode, records or resources are removed fromthe database. Records are specified by.IR index ,resources are specified by.I typeand.IR id ..TP.B VVersion. Print the version number..TP.B rCreate resource..B ris an convenience alias for.B c -a.BR resource .See.B HEADER OPTIONSsection..TP.B l.B lis an alias for.BR t ..TP.B i.B iis an alias for.BR h ..TP.BI - modeAll modes may be prefixed with.B -if that makes you feel better..SH HEADER OPTIONSThe.BR a ,.BR c ,.BR d ,.B umodes accept.I hoptionswhich update the database information as follows:.TP.BI \-n\  name\ Database name. This is the name of the database that will be visibleon the device. Note that this is entirely independent from the.IR dbfile ,although some utilities will imply the latter from the former..TP.BI \-T\  type\ The four character database type. For example, an applicationresource database is of type.IR 'appl' .The address book database is of type.IR 'DATA' ..TP.BI \-I\  cid\ The four character creator identifier. This specifies which applicationowns the database..TP.BI \-a\  attributes\ Database attributes. These may be specified as a hex number, or symbolicallyusing the keywords.BR  resource ,.BR  readonly ,.BR  dirty ,.BR  backup ,.BR  newer ,.BR  reset ,.BR  copyprevent ,.BR  stream ,.BR  hidden ,.BR  launchable ,.BR  recyclable ,.BR  bundle ,or any bit-ORed combination of names or hex numbers. For new databases,the attributes default to 0x0 (none set)..TP.BI \-v\  version\ The database version. For new databases, this defaults to 1..TP.BI \-C\  creation_time\ The time the database was created.Times should be specified using the format.IR [[CC]YY]MMDDHHMM ,or using the special keywords.BR now ,or.BR never .The former is the current time, that latter is thebeginning of PalmOS time (90401010000).For new databases, this defaults to.BR now ..TP.BI \-m\  last_modification_time\ The time the database was created. For new databases, this defaults to.BR now ..TP.BI \-b\  last_backup_time\ The time the database was last backed up. For new databases, this defaults to.BR never ..SH INFO OPTIONSThe.BR x ,.BR c ,.BR u ,and.B amodes accept.IR ioptions ,and the.B dmode accepts.IR doptions ,which operate on the app and sort info in the database:.TP.TP.BI \-A\  filename\ AppInfo filename. In.BR xmode, specifies that the database AppInfo should be saved to.I filename.In.BR c , u ,and.B amodes, specifies that the database AppInfo should be set from.I filename..TP.BI \-S\  filename\ SortInfo filename. In.BR xmode, specifies that the database SortInfo should be saved to.I filename.In.BR c , u ,and.B amodes, specifies that the database SortInfo should be set from.I filename..TP.B \-ADelete AppInfo. In.B dmode, specifies that the database AppInfo should be deleted from thedatabase..TP.B \-SDelete SortInfo. In.B dmode, specifies that the database SortInfo should be deleted from thedatabase..SH EXAMPLESThe following example prints the header information for the database 'foo.pdb'..PP.B par h foo.pdb.PPThe following extracts all records from 'foo.pdb'..PP.B par x foo.pdb.PPThe following extracts the application icon resource from 'app.prc' and savesit in the file 'icon.Tbmp'. Note the use of decimal specification for theresource id. The id may be specified in hex using by using the '0x' prefix..PP.B par x app.prc -f icon.Tbmp tAIB 1000.PPThe following creates a new application resource database from all thethe files with a '.bin' extension in the current directory. The databasewill have creator id of 'djwP' and will have the backup bit set..PP.B par c -a \&"resource|backup\&" app.prc myapp appl djwP *.bin.PPIf you use the author's technique for creating multi-segment libraryprcs with CodeWarrior, the following example will be useful. Thisexample uses the touch mode to change the database type to 'libr', andto change the attribute type of the primary code resource fromtype = 'code', id = '1' (as used in an application) to type = 'libr', id = '0' (as used in a library)..PP.B par u -T libr mylib.prc -T libr 0 code 1.PPThe following example merges the resources from two differentresource databases,.IR code.prc ,and.I resource.prcinto a single target application database,.IR myapp.prc .This technique is useful for managing code and non-code elementsof an application, using the individual resource databases aslibraries..PP.B par r myapp.prc myapp appl djwP code.prc resource.prc.PPBy default,.B parsaves extracted resources using the form.IR <type><id>.bin ,where.I <type>is the 4 character type of the resource, and<id>is the resource id in 4 digit hexadecimal. When appending resourcesto a new or existing resource database,.B parwill attempt to decode the resource and id of the resource being appendedfrom the resource filename using this same naming scheme, or you canexplicitly specify the resource and id using the.I -Tsyntax. Here are two invocations of.B parthat do exactly the same thing: create a new resource database with oneresource which has type = NFNT and id = 256 (0x0100 hexadecimal):.PP.B par c -a \&"resource\&" font.prc Font FONT djwF NFNT0100.bin.P.B par r font.prc Font FONT djwF -T NFNT 256 myfont.PPThe following example creates a stream database that can be accessed usingthe PalmOS FileStream API. The stream will contain the contents of thefile 'WarAndPeace.txt':.PP.B par c -a \&"stream\&" book.pdb Book DATA djwS WarAndPeace.txt.PPIn the following example, 'book.pdb' is a stream database. Thisexample extracts the stream from that database and stores the resultin the output file 'Book.txt':.PP.B par x book.pdb Book.txt.SH AUTHOR.B parwas written by David Williams, djw@djw.org

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?