Debian Codegraph @

lib/text2c.c

raw symbols SCIP
1 /* The Ace of Penguins - text2c.c
2 Copyright (C) 1998 DJ Delorie
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17
18 #include <stdio.h>
19 #include <stdlib.h>
20
21 int
22 main(int argc, char **argv)
23 {
24 int w=0, c;
25 char *base = "text";
26 if (argc > 1)
27 base = argv[1];
28
29 printf("/* This is a generated file - DO NOT EDIT */\n");
30 printf("/* Copyright for this file is copied from the source from */\n");
31 printf("/* which it was generated */\n\n");
32 printf("char %s[] = {\n", base);
33 while ((c = getchar()) != EOF)
34 {
35 if (w == 16)
36 {
37 putchar('\n');
38 w = 0;
39 }
40 printf(" %d,", c);
41 w++;
42 }
43 printf("\n 0 };\n");
44 exit(0);
45 }