Even if you do system-level programming almost exclusively, with C and assembler as your main development tools, at times it can be advantageous to look back for an opportunity to use higher level language. Much higher sometimes. Suppose, you are developing a VxD for Windows 3.1 and want to write part of it in C. You got the DDK with the whole bunch of include files in it, but the header files suitable for your language are nowhere to be found. Or maybe, you got an idea for a debugger or for that killer spy application that needs to display symbolic labels for the function calls. All you need is to extract those labels. This begs for a little bit of text processing automation.
DEVID and SERVICES are rather simple AWK programs to do the job. DEVID, scans a number of explicitly specified include files or an entiire subdirectory containing such files for VxD declarations, and produces a list of them in a form of 'name - numeric id'. SERVICES, in turn, takes this list and the nameof an include file, and produces either a C language header file or a formatted table of service names and IDs. The command-line syntax for running this programs is:
DEVID -ooutput_file <inc_file | subdirectory>, such as in 'devid -odevice.id d:\ddk\inc32\*.inc' |
SERVICES <-TABLE | -INCLUDE> inc_file id_file, such as in 'services -TABLE d:\ddk\inc32\vmm.inc device.id'. |
Along with the programs' source code, included are a few convenient batch files to automate processing of a large number of files.
This page has been visited times since Mar-24-1998