File: deema.c

package info (click to toggle)
clisp 1997-12-06-1
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 20,744 kB
  • ctags: 8,390
  • sloc: ansic: 37,808; lisp: 37,255; asm: 6,393; sh: 3,077; objc: 2,481; makefile: 1,174; sed: 96; perl: 14
file content (25 lines) | stat: -rw-r--r-- 499 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* C-Programm-Prprozessor-Hilfe:
   Fgt _EMA_ in leere Macro-Argumente ein.
   quivalent zu  sed -e 's/,)/,_EMA_)/g'
   Bruno Haible 29.12.1993
*/

#include <stdio.h>

#ifdef __cplusplus
extern "C" void exit(int);
#endif

main ()
  { int c;
    int c1 = -1;
    while (1)
      { c = getchar(); if (c==EOF) break;
        if ((c == ')') && (c1 == ',')) { fputs("_EMA_",stdout); }
        putchar(c);
        c1 = c;
      }
    if (ferror(stdin) || ferror(stdout)) { exit(1); }
    exit(0);
  }