From: Maurice L. <mj...@ga...> - 2003-02-05 18:27:03
|
Rafael Laboissiere writes: > * Rafael Laboissiere <lab...@ps...> [2003-02-04 22:37]: > > > c) At build time (not configuration time), a small C program dlopen the > > <driver>.c files, get the symbols described above and write the > > associated device entries in <driver>.rc (or whichever name). > > Just to make things a bit more concrete, here is the design that I have in > mind. I will take the ps.c driver as an example. The following global > variables will be defined in the driver source: > > char* DEVICES_ps = "ps:psc"; > > char* DESCRIPTION_ps = "PostScript File (monochrome)"; > int TYPE_ps = plDevType_FileOriented; > int SEQNUM_ps = 29; > char* SYMTAG_ps = "psm"; > > char* DESCRIPTION_psc = "PostScript File (color)"; > int TYPE_psc = plDevType_FileOriented; > int SEQNUM_psc = 30; > char* SYMTAG_psc = "psc"; > ... > What do you think? I accept suggestions for better variable names. If you are introducing variables into the global name space (i.e. accessible via "extern"), at least give them a plplot-specific introducer like "pl_" or even better "pldev_". -- Maurice LeBrun mj...@ga... Research Organization for Information Science and Technology of Japan (RIST) |