#include #include #include #include #include #include #include "general.h" FILE* logFile; char* product; void Header(argv) char* argv[]; { time_t t; PRINT1("\n=========== ACLLIST =============\n") PRINT2("Input BOM: %s\n",argv[2]); PRINT2("Output path: %s\n",argv[3]); PRINT2("Product: %s\n",argv[4]); PRINT2("Platform: %s\n",argv[5]); time(&t); PRINT2("Time: %s",ctime(&t)) PRINT1("==================================\n\n"); } void Usage() { printf("PURPOSE: Create ACLLIST.INF for the specified product.\n"); printf("\n"); printf("PARAMETERS:\n"); printf("\n"); printf("[LogFile] - Path to append a log of actions and errors.\n"); printf("[InBom] - Path of BOM for which ACLLIST.INF is to be made.\n"); printf("[Output path] - Path of the ACL list to create.\n"); printf("[Product] - Product to make ACLLIST.INF for - NTFLOP, LMFLOP, NTCD, LMCD.\n"); printf("[Platform] - X86, ALPHA, or MIPS\n"); } int __cdecl ACLPathCompare(const void *,const void *); int __cdecl main(argc,argv) int argc; char* argv[]; { Entry *e; int records,i,j,lanmanProduct; char *buf; FILE *f; char path[MAX_PATH]; char *acl; if (argc!=6) { Usage(); return(1); } if ((logFile=fopen(argv[1],"a"))==NULL) { printf("ERROR Couldn't open log file %s\n",argv[1]); return(1); } Header(argv); LoadFile(argv[2],&buf,&e,&records,argv[4]); if (MyOpenFile(&f,argv[3],"w")) exit(1); for (i=0;iplatform,e2->platform)) return(result); if (result=_stricmp(e1->aclpath,e2->aclpath)) return(result); return (_stricmp(e1->name,e2->name)); }