Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!ames!ucbcad!ucbvax!decvax!decwrl!sun!calma!clark From: clark@calma.UUCP (Al Clark) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: need cpp macros to concatenate names Message-ID: <634@calma.UUCP> Date: Mon, 4-May-87 17:09:07 EDT Article-I.D.: calma.634 Posted: Mon May 4 17:09:07 1987 Date-Received: Tue, 5-May-87 06:49:09 EDT Distribution: na Organization: GE/Calma Co., R&D Systems Engineering, Milpitas, CA Lines: 33 Xref: mnetor comp.unix.wizards:2146 comp.unix.questions:2141 *** IS THERE REALLY A LINE EATER ??? *** Has anyone had any success using a macro to concatenate two words; eg: concat(one, word) to generate the the single word 'oneword', as in the following code segment. #define prefix my #define concat(x,y) x\ y main() { long *concat(prefix,file); } The above works on some preprocessors, not others. In all cases, the escaped new line provides token separation. On the Sequent ucb universe, and on the IBM RT the two words endup concatenated; on the Sequent att universe, they are separated by a space. Our intent is to be portable to any System V machine with a minimum of changes. Anybody have a suggestion? (We know about m4 and sed, but we can't afford to add another step to the compilation of many thousands of lines of code, which are all compiled together on a major build of an executable module.) manual page, Any help will be appreciated. Please mail responses, unless you think they are of general interest. -- Al Clark - {ucbvax,sun,...}calma!clark NOTE: This is a courtesy account; I am not employed by calma.