aboutsummaryrefslogtreecommitdiff
path: root/ld/mkscript.c
blob: b69f207157bb0018e130e991fd2da535ee4cd553 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>

int
main() 
{
  int ch;
  ch = getchar();
  printf("/* Generated through mkscript */\n");
  printf("\"{ \\\n");
  while (ch != EOF) {
    if (ch == '\"' || ch == '\\' || ch == '\'') {
      putchar('\\');
      putchar(ch);
    }
    else { if (ch == '\n')
      fputs("\\n\\", stdout);
    putchar(ch);
     }
    ch = getchar();
  }
  printf("}\"\n");
  return 0;
}