Article # 201, added by Geoworks, historical record
| first | previous | index | next | last |

Automatically updating protocol numbers with GREV.



Q. Are there special rules with respect to version numbers and protocol
   numbers of device drivers?

   For example in driver.def is the following definitions:

     ; Protocol number for "DriverFunction" interface. All other driver
     ; protocols
     ; will be based on this number.
     ;
     DRIVER_PROTO_MAJOR	equ	2
     DRIVER_PROTO_MINOR	equ	0

   and in the header for DR_INIT:

     protominor KernelDR_INITWithGeodeHandle ; etype

   What are the (standard) means to control version numbers and protocol 
   numbers? I used the -P and -R parameters of Glue to set my version
   number to 2.0.0.0 and my Protocol number to 2.0. I know GREV can also
   be used to control version numbers, but I had difficulties using it.

A. Use Grev. It is the tool for setting both the protocol and revision
   numbers of the geode you're writing. The -P and -R only display the
   current protocol and revision numbers, not change them. Here are some
   examples of using grev:

   - Create .rev file:
     grev new myapp.rev

   - Update protocol major number:
     grev NPM myapp.rev

   - Update protocol minor number:
     grev npm myapp.rev

   - Change release/revision number:
     grev newrev myapp.rev x.y.z

     [Note that the book is incorrect in showing only two digits. Grev
     wants three period-separated numbers.]

   For more information on grev, see section 10.7 in the Tools book.