File: deletest.c

package info (click to toggle)
icmake 6.21-4
  • links: PTS
  • area: main
  • in suites: hamm, potato, slink
  • size: 1,964 kB
  • ctags: 1,053
  • sloc: ansic: 9,245; makefile: 1,139; sh: 141; 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 */
}