File: deema.c

package info (click to toggle)
clisp 1:2.41-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 49,804 kB
  • ctags: 16,291
  • sloc: lisp: 75,912; ansic: 49,247; xml: 24,289; asm: 21,993; sh: 11,234; fortran: 6,692; cpp: 2,660; objc: 2,481; makefile: 2,355; perl: 164; sed: 55
file content (27 lines) | stat: -rw-r--r-- 498 bytes parent folder | download
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
26
27
/* C-Programm-Präprozessor-Hilfe:
   Fügt _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

int 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) || fclose(stdout)) { exit(1); }
  exit(0);
}