File: deletest.c

package info (click to toggle)
icmake 6.22-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,148 kB
  • ctags: 1,042
  • sloc: ansic: 9,241; makefile: 1,134; sh: 235; asm: 126
file content (19 lines) | stat: -rw-r--r-- 596 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
                                D E L E T E S T . C

    Delete standard comment from the line pointed to by 'cp'
*/

#include "icm-pp.h"

void delete_std_comment(char *cp)
{
    char
        *eoc;                               /* end of comment */

    if (!(eoc = strstr(cp, "*/")))          /* can't find it ? */
        error ("%s: %d: unterminated std-comment in #define",
                filestack [filesp].n, filestack [filesp].l);
    else                                    /* copy the trailer to cp */
        strcpy(cp, eoc + 2);                /* thus killing the std-comment */
}