Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!jarthur!uunet!dg!spud!bkahn From: bkahn@spud.webo.dg.com (Bruce Kahn) Newsgroups: comp.binaries.ibm.pc.d Subject: Q: MSC & Macro substitutions Message-ID: <1197@dg.dg.com> Date: 6 Dec 90 21:38:13 GMT Sender: root@dg.dg.com Reply-To: bkahn@archive.webo.dg.com (Bruce Kahn) Organization: Data General Corporation, Westboro, MA Lines: 30 I may be dense but I cant seem to figure out the use of #defines w/macros and auto substitution of parameters. I have some Uni* code Im porting (indent actually) that uses a statement : #define check_size(name) \ if (e_/**/name >= l_/**/name) { \ register nsize = l_/**/name-s_/**/name+400; \ name/**/buf = (char *) realloc(name/**/buf, nsize); \ e_/**/name = name/**/buf + (e_/**/name-s_/**/name) + 1; \ l_/**/name = name/**/buf + nsize - 5; \ s_/**/name = name/**/buf + 1; \ } and then elsewhere in the main program it does a call like: check_size (code); where there are variables named e_code, l_code, codebuf and s_code already declared. What would be the equivalent MSC 5.1 code to do this? I tried to remove the offending /**/ but then I get a compile error w/e_name, etc... Any suggestions (apart from hard code it)?? -- Bruce (bkahn@archive.webo.dg.com or kahn@adam.dg.com) Standard disclaimers apply, except where prohibited by law...