Install sccs headers and copyright notices.
[unix-history] / usr / src / usr.bin / tn3270 / tools / mkdstoas / mkdstoas.c
CommitLineData
992de934
GM
1/*
2 * Copyright (c) 1984-1987 by the Regents of the
3 * University of California and by Gregory Glenn Minshall.
4 *
5 * Permission to use, copy, modify, and distribute these
6 * programs and their documentation for any purpose and
7 * without fee is hereby granted, provided that this
8 * copyright and permission appear on all copies and
9 * supporting documentation, the name of the Regents of
10 * the University of California not be used in advertising
11 * or publicity pertaining to distribution of the programs
12 * without specific prior permission, and notice be given in
13 * supporting documentation that copying and distribution is
14 * by permission of the Regents of the University of California
15 * and by Gregory Glenn Minshall. Neither the Regents of the
16 * University of California nor Gregory Glenn Minshall make
17 * representations about the suitability of this software
18 * for any purpose. It is provided "as is" without
19 * express or implied warranty.
20 */
21
22#ifndef lint
23static char sccsid[] = "@(#)mkdstoas.c 1.8 (Berkeley) %G%";
24#endif /* not lint */
25
8d73ea61 26#include <stdio.h>
e56fc5cb 27#if defined(unix)
577b1ba9 28#include <strings.h>
e56fc5cb
GM
29#else /* defined(unix) */
30#include <string.h>
31#endif /* defined(unix) */
8d73ea61 32#include <ctype.h>
4718d085
GM
33#include "../api/asc_ebc.h"
34#include "../api/ebc_disp.h"
8d73ea61
GM
35
36
e56fc5cb 37int
8d73ea61
GM
38main()
39{
40 int i;
41
42 /* For each display code, find the ascii code that matches */
43
663ee4bc 44 printf("unsigned char disp_asc[256] = {");
8d73ea61
GM
45 for (i = 0; i < sizeof disp_ebc; i++) {
46 if ((i%8) == 0) {
47 printf("\n");
48 }
138011c0 49 printf("\t0x%02x,", ebc_asc[disp_ebc[i]]);
663ee4bc
GM
50 }
51 for (i = sizeof disp_ebc; i < 256; i++) {
52 if ((i%8) == 0) {
53 printf("\n");
54 }
409b86f8 55 printf("\t0x%02x,", ' ');
8d73ea61
GM
56 }
57 printf("\n};\n");
e56fc5cb
GM
58
59 return 0;
8d73ea61 60}