#include #include #include #include #include /* local.c - It will open a localization file and append the content of the localization file to each file indicated within the localization file. syntax: local < input file > < localize directory > */ typedef struct _PLATFORM_DATA { // // Name of platform and platform's subdirectory in // the build tree. // PSTR PlatformName; // // Current output file for this platform. // If a line in the input file applies to this platform, // this handle will be used to write the line into the // output file being generated for this platform. // FILE *OutputFile; } PLATFORM_DATA, *PPLATFORM_DATA; // // When porting, simply bump up this number and add // a line to the PlatformData array below. // #define NUMBER_OF_PLATFORMS 4 PLATFORM_DATA PlatformData[NUMBER_OF_PLATFORMS] = {{ "i386", NULL }, { "mips", NULL }, { "alpha", NULL }, { "ppc", NULL }}; // // Value to indicate that a line of input belongs in output file // for all platforms. // #define ALL_PLATFORMS NUMBER_OF_PLATFORMS // // Input buffer. // CHAR InputBuffer[1000]; VOID CloseAllOpenOutputFiles( VOID ) { unsigned Platform; for(Platform=0; Platform \n"); return 1; } if(InputFile = fopen(argv[1],"r")) { ReturnCode = ProcessInputFile(InputFile,argv[2]) ? 0 : 1; fclose(InputFile); } else { fprintf(stderr,"cannot open localizer file."); ReturnCode = 1; } return ReturnCode; }