mksyntax.c (99110) | mksyntax.c (104275) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 32 unchanged lines hidden (view full) --- 41#endif /* not lint */ 42 43#ifndef lint 44#if 0 45static char sccsid[] = "@(#)mksyntax.c 8.2 (Berkeley) 5/4/95"; 46#endif 47#endif /* not lint */ 48#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 32 unchanged lines hidden (view full) --- 41#endif /* not lint */ 42 43#ifndef lint 44#if 0 45static char sccsid[] = "@(#)mksyntax.c 8.2 (Berkeley) 5/4/95"; 46#endif 47#endif /* not lint */ 48#include <sys/cdefs.h> |
49__FBSDID("$FreeBSD: head/bin/sh/mksyntax.c 99110 2002-06-30 05:15:05Z obrien $"); | 49__FBSDID("$FreeBSD: head/bin/sh/mksyntax.c 104275 2002-10-01 08:40:07Z mux $"); |
50 51/* 52 * This program creates syntax.h and syntax.c. 53 */ 54 55#include <stdio.h> 56#include <stdlib.h> 57#include <string.h> --- 330 unchanged lines hidden (view full) --- 388 if (*p > maxdigit) 389 maxdigit = *p; 390 fputs("extern const char digit_value[];\n", hfile); 391 fputs("\n\nconst char digit_value[] = {\n", cfile); 392 for (i = 0 ; i <= maxdigit ; i++) { 393 for (p = digit ; *p && *p != i ; p++); 394 if (*p == '\0') 395 p = digit; | 50 51/* 52 * This program creates syntax.h and syntax.c. 53 */ 54 55#include <stdio.h> 56#include <stdlib.h> 57#include <string.h> --- 330 unchanged lines hidden (view full) --- 388 if (*p > maxdigit) 389 maxdigit = *p; 390 fputs("extern const char digit_value[];\n", hfile); 391 fputs("\n\nconst char digit_value[] = {\n", cfile); 392 for (i = 0 ; i <= maxdigit ; i++) { 393 for (p = digit ; *p && *p != i ; p++); 394 if (*p == '\0') 395 p = digit; |
396 fprintf(cfile, " %d,\n", p - digit); | 396 fprintf(cfile, " %td,\n", p - digit); |
397 } 398 fputs("};\n", cfile); 399} | 397 } 398 fputs("};\n", cfile); 399} |