FreeCalypso > hg > ueda-linux
view ueda/uschem-print/pstring.c @ 74:58f11f06d831
pads2gpcb: main output implemented
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Feb 2016 00:45:24 +0000 |
parents | cd92449fdb51 |
children |
line wrap: on
line source
/* * Emitting PostScript strings, handling all special characters */ #include <ctype.h> emit_ps_string(str) char *str; { register char *cp; register int c; putchar('('); for (cp = str; c = *cp; cp++) { if (!isprint(c)) { printf("\\%03o", c); continue; } if (c == '(' || c == ')' || c == '\\') putchar('\\'); putchar(c); } putchar(')'); }