msgcat.c (11662) | msgcat.c (17141) |
---|---|
1/* $Id: msgcat.c,v 1.3 1995/06/17 03:02:21 ache Exp $ */ | 1/* $Id: msgcat.c,v 1.4 1995/10/22 14:39:22 phk Exp $ */ |
2 3/*********************************************************** 4Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts. 5 6 All Rights Reserved 7 8Permission to use, copy, modify, and distribute this software and its 9documentation for any purpose and without fee is hereby granted, --- 297 unchanged lines hidden (view full) --- 307 308 fcntl(cat->fd, F_SETFD, FD_CLOEXEC); 309 310 if (read(cat->fd, &header, sizeof(header)) != sizeof(header)) CORRUPT(); 311 312 if (strncmp(header.magic, MCMagic, MCMagicLen) != 0) CORRUPT(); 313 314 if (header.majorVer != MCMajorVer) { | 2 3/*********************************************************** 4Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts. 5 6 All Rights Reserved 7 8Permission to use, copy, modify, and distribute this software and its 9documentation for any purpose and without fee is hereby granted, --- 297 unchanged lines hidden (view full) --- 307 308 fcntl(cat->fd, F_SETFD, FD_CLOEXEC); 309 310 if (read(cat->fd, &header, sizeof(header)) != sizeof(header)) CORRUPT(); 311 312 if (strncmp(header.magic, MCMagic, MCMagicLen) != 0) CORRUPT(); 313 314 if (header.majorVer != MCMajorVer) { |
315 fprintf(stderr, "%s: %s is version %d, we need %d.\n", ERRNAME, | 315 fprintf(stderr, "%s: %s is version %ld, we need %ld.\n", ERRNAME, |
316 catpath, header.majorVer, MCMajorVer); 317 return(0); 318 } 319 320 if (header.numSets <= 0) { | 316 catpath, header.majorVer, MCMajorVer); 317 return(0); 318 } 319 320 if (header.numSets <= 0) { |
321 fprintf(stderr, "%s: %s has %d sets!\n", ERRNAME, catpath, | 321 fprintf(stderr, "%s: %s has %ld sets!\n", ERRNAME, catpath, |
322 header.numSets); 323 return(0); 324 } 325 326 cat->numSets = header.numSets; 327 cat->sets = (MCSetT *) malloc(sizeof(MCSetT) * header.numSets); 328 if (!cat->sets) NOSPACE(); 329 --- 65 unchanged lines hidden --- | 322 header.numSets); 323 return(0); 324 } 325 326 cat->numSets = header.numSets; 327 cat->sets = (MCSetT *) malloc(sizeof(MCSetT) * header.numSets); 328 if (!cat->sets) NOSPACE(); 329 --- 65 unchanged lines hidden --- |