1313 (void) printf("%s", gettext("ELF"));
1314 print_elf_class(class);
1315 print_elf_datatype(format);
1316 print_elf_type(EInfo);
1317
1318 if (EInfo.core_type != EC_NOTCORE) {
1319 /* Print what kind of core is this */
1320 if (EInfo.core_type == EC_OLDCORE)
1321 (void) printf(" %s", gettext("pre-2.6 core file"));
1322 else
1323 (void) printf(" %s", gettext("core file"));
1324 }
1325
1326 /* Print machine info */
1327 print_elf_machine(EInfo.machine);
1328
1329 /* Print Version */
1330 if (version == 1)
1331 (void) printf(" %s %d", gettext("Version"), version);
1332
1333 /* Print Flags */
1334 print_elf_flags(EInfo);
1335
1336 /* Last bit, if it is a core */
1337 if (EInfo.core_type != EC_NOTCORE) {
1338 /* Print the program name that dumped this core */
1339 (void) printf(gettext(", from '%s'"), EInfo.fname);
1340 return (0);
1341 }
1342
1343 /* Print Capabilities */
1344 if (EInfo.cap_str[0] != '\0')
1345 (void) printf(" [%s]", EInfo.cap_str);
1346
1347 if ((EInfo.type != ET_EXEC) && (EInfo.type != ET_DYN))
1348 return (0);
1349
1350 /* Print if it is dynamically linked */
1351 if (EInfo.dynamic)
1352 (void) printf(gettext(", dynamically linked"));
1466 * starting at the current position of 'i'.
1467 * Returns 1 as long as we don't increment i past the
1468 * size of fbuf (fbsz). Otherwise returns 0.
1469 */
1470
1471 static int
1472 ascom(void)
1473 {
1474 while (fbuf[i] == ASCOMCHAR) {
1475 i++;
1476 while (fbuf[i++] != '\n')
1477 if (i >= fbsz)
1478 return (0);
1479 while (fbuf[i] == '\n')
1480 if (i++ >= fbsz)
1481 return (0);
1482 }
1483 return (1);
1484 }
1485
1486 static int
1487 sccs(void)
1488 { /* look for "1hddddd" where d is a digit */
1489 register int j;
1490
1491 if (fbuf[0] == 1 && fbuf[1] == 'h') {
1492 for (j = 2; j <= 6; j++) {
1493 if (isdigit(fbuf[j]))
1494 continue;
1495 else
1496 return (0);
1497 }
1498 } else {
1499 return (0);
1500 }
1501 return (1);
1502 }
1503
1504 static int
1505 english(char *bp, int n)
1506 {
1507 #define NASC 128 /* number of ascii char ?? */
1508 register int j, vow, freq, rare, len;
|
1313 (void) printf("%s", gettext("ELF"));
1314 print_elf_class(class);
1315 print_elf_datatype(format);
1316 print_elf_type(EInfo);
1317
1318 if (EInfo.core_type != EC_NOTCORE) {
1319 /* Print what kind of core is this */
1320 if (EInfo.core_type == EC_OLDCORE)
1321 (void) printf(" %s", gettext("pre-2.6 core file"));
1322 else
1323 (void) printf(" %s", gettext("core file"));
1324 }
1325
1326 /* Print machine info */
1327 print_elf_machine(EInfo.machine);
1328
1329 /* Print Version */
1330 if (version == 1)
1331 (void) printf(" %s %d", gettext("Version"), version);
1332
1333 if (EInfo.kmod) {
1334 (void) printf(", %s", gettext("kernel module"));
1335 }
1336
1337 /* Print Flags */
1338 print_elf_flags(EInfo);
1339
1340 /* Last bit, if it is a core */
1341 if (EInfo.core_type != EC_NOTCORE) {
1342 /* Print the program name that dumped this core */
1343 (void) printf(gettext(", from '%s'"), EInfo.fname);
1344 return (0);
1345 }
1346
1347 /* Print Capabilities */
1348 if (EInfo.cap_str[0] != '\0')
1349 (void) printf(" [%s]", EInfo.cap_str);
1350
1351 if ((EInfo.type != ET_EXEC) && (EInfo.type != ET_DYN))
1352 return (0);
1353
1354 /* Print if it is dynamically linked */
1355 if (EInfo.dynamic)
1356 (void) printf(gettext(", dynamically linked"));
1470 * starting at the current position of 'i'.
1471 * Returns 1 as long as we don't increment i past the
1472 * size of fbuf (fbsz). Otherwise returns 0.
1473 */
1474
1475 static int
1476 ascom(void)
1477 {
1478 while (fbuf[i] == ASCOMCHAR) {
1479 i++;
1480 while (fbuf[i++] != '\n')
1481 if (i >= fbsz)
1482 return (0);
1483 while (fbuf[i] == '\n')
1484 if (i++ >= fbsz)
1485 return (0);
1486 }
1487 return (1);
1488 }
1489
1490 /* look for "1hddddd" where d is a digit */
1491 static int
1492 sccs(void)
1493 {
1494 register int j;
1495
1496 if (fbuf[0] == 1 && fbuf[1] == 'h') {
1497 for (j = 2; j <= 6; j++) {
1498 if (isdigit(fbuf[j]))
1499 continue;
1500 else
1501 return (0);
1502 }
1503 } else {
1504 return (0);
1505 }
1506 return (1);
1507 }
1508
1509 static int
1510 english(char *bp, int n)
1511 {
1512 #define NASC 128 /* number of ascii char ?? */
1513 register int j, vow, freq, rare, len;
|