Source File Organization
Peter da Silva
peter at ficc.ferranti.com
Wed Feb 27 09:36:39 AEST 1991
In article <1991Feb26.045242.23453 at rfengr.com> rfarris at rfengr.com (Rick Farris) writes:
> My problem is: How do I keep the darn things in sync?
Try this:
---- ltrs.h
typedef enum { A, B, C, D } CMD;
#ifdef LTRS_C
char ltrs[] = { 'A', 'B', 'C', 'D' };
#else
extern char ltrs[];
#endif
---- ltrs.c
#define LTRS_C
#include "ltrs.h"
--
Peter da Silva. `-_-' peter at ferranti.com
+1 713 274 5180. 'U` "Have you hugged your wolf today?"
More information about the Comp.lang.c
mailing list