Xref: utzoo comp.lang.c:22607 comp.unix.questions:16854 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!apple!bloom-beacon!eru!luth!sunic!mcsun!tuvie!edvvie!eliza!johnny From: johnny@edvvie.at (Johann Schweigl) Newsgroups: comp.lang.c,comp.unix.questions Subject: preprocessor question (non-ANSI) Keywords: #define C ANSI Message-ID: <174@eliza.edvvie.at> Date: 8 Oct 89 09:21:38 GMT Organization: Edv GesmbH, Austria/Europa Lines: 16 How can I replace a text token by itself, along with some additional text? Example: EXEC SQL select * from emp; __curline = 23; EXEC SQL select * from emp; before ^^^^^^^^^^^^^^^^^^^^ after ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ #define EXEC __curline = __LINE__; EXEC is not the solution, cpp would try to resolve EXEC recursively I know, sed is the most natural solution, but I want to do all by including a single file. ANSI is not spoken on my system. Any help appreciated. Thanks, johnny -- This does not reflect the | Johann Schweigl | DOS? opinions of my employer. | johnny@edvvie.at | Kind of complicated I am busy enough by talking | | bootstrap loader ... about my own ... | EDVG Vienna |