X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=ld%2Fmkscript.c;h=66ddfc246e187307bbf44bb34ea7b594b7de0059;hb=8b046402f5a322a59d3e29a41f4fdce2ba0f1499;hp=b69f207157bb0018e130e991fd2da535ee4cd553;hpb=6719c75b99c88ea91807a3b6bf134bcac4c24af0;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/mkscript.c b/ld/mkscript.c index b69f207157..66ddfc246e 100644 --- a/ld/mkscript.c +++ b/ld/mkscript.c @@ -1,12 +1,32 @@ +/* Filter stdin to a suitable C string literal. + Copyright (C) 1991 Free Software Foundation, Inc. + +This file is part of GLD, the Gnu Linker. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + #include int main() { int ch; + ch = getchar(); printf("/* Generated through mkscript */\n"); - printf("\"{ \\\n"); + printf("\"{"); while (ch != EOF) { if (ch == '\"' || ch == '\\' || ch == '\'') { putchar('\\');