Sponsored Content
Top Forums Programming Way to print a code with substituted macro..? Post 302431393 by alex_5161 on Monday 21st of June 2010 06:50:30 PM
Old 06-21-2010
Way to print a code with substituted macro..?

Is there any way to produce a code with all use dmacro to be substituted up to 'ready for compilation' condition?
Some macro are build up and it is hard to replace all them up to final code by hand.
I need to see the final line after all macro been applied by preprocessor.

How that could be done?

Thanks!
 

10 More Discussions You Might Find Interesting

1. Programming

macro

Can i define a macro for a function of 10 LOC. (9 Replies)
Discussion started by: bankpro
9 Replies

2. Programming

Regarding #ident macro

Hi, In my application I have some number c files. In each of the file the following line will be the first statement. #ident "@(#) set.c 14.1.2.2 05/15/01 17:06:32" I would like to know what is the use of the above statement. Thanks Sarwan (1 Reply)
Discussion started by: sarwan
1 Replies

3. UNIX for Dummies Questions & Answers

Only one particular occurence needs to be substituted !!!

In a file, field separetor in line is irregular number of spaces, so I canot use field in sub function to get my charecter replaced with empty space. I would like to substitute only one perticular charecter with space at perticular posiotn, so I canot use perticular character as that may occur... (6 Replies)
Discussion started by: vaka
6 Replies

4. Programming

Make-question - redefine a macro, using another macro..?

I think there is no problem to use any macro in a new macro definishion, but I have a problem with that. I can not understand why? I have a *.mak file that inludes file with many definitions and rules. ############################################## include dstndflt.mak ... One of the... (2 Replies)
Discussion started by: alex_5161
2 Replies

5. Shell Programming and Scripting

substituted variable assignment

I try to run this script, however, it gives an exception in line 3. How do I do an assignment to a substituted variable? #!/bin/bash name=fruit ext_$(eval echo ${name})=apple tmp=ext_$(eval echo ${name}) if ]; then echo "apple" elif ]; then echo "orange" fi echo ${!tmp} Error... (2 Replies)
Discussion started by: angelokh
2 Replies

6. Programming

Linux Kernel code "current" macro

I was going through the Linux code, i stuck with few inline assembly language code, I have tried online but in vain. Any help is much appreciated. Thanks. /* how to get the thread information struct from C */ static inline struct thread_info *current_thread_info(void) { struct... (3 Replies)
Discussion started by: kumaran_5555
3 Replies

7. Shell Programming and Scripting

Unix macro help

Hi, I just opened one old RH box and found number of "macros" in there, that how they called in how-to doc, let say you type <rx> and this does a lot of stuff. I can't figure out how it work, how I can edit/display these macros? Can anybody point to the right directions? I have some academic... (3 Replies)
Discussion started by: trento17
3 Replies

8. UNIX for Dummies Questions & Answers

macro

Can I create a macro in UNIX? If so where do I find out how? (1 Reply)
Discussion started by: JD_Sal
1 Replies

9. Programming

Explanation of a macro

Can some body explain this part in a header file for me? #include <limits.h> #define BIGNUM unsigned long long typedef BIGNUM (*hash_t) (char *str); ......I have hard time for the second part: typedef BIGNUM (*hash_t) (char *str); First, I could not find the definition of hash_t, which... (1 Reply)
Discussion started by: yifangt
1 Replies

10. Shell Programming and Scripting

Python: Suppress lines not substituted

Hi all, I started playing around with Python (2.6.6) trying to parse a file. No matter what I tried so far I am not able to print only the lines/group/backreference that have been affected by the substitution. Instead I get also the other lines too File to parse: some more text ... (2 Replies)
Discussion started by: zaxxon
2 Replies
CC(1)							      General Commands Manual							     CC(1)

NAME
cc - C compiler (2BSD) SYNOPSIS
cc [ option ] ... file ... DESCRIPTION
Cc is the UNIX C compiler. Cc accepts several types of arguments: Arguments whose names end with `.c' are taken to be C source programs; they are compiled, and each object program is left on the file whose name is that of the source with `.o' substituted for `.c'. The `.o' file is normally deleted, however, if a single C program is compiled and loaded all at one go. In the same way, arguments whose names end with `.s' are taken to be assembly source programs and are assembled, producing a `.o' file. The following options are interpreted by cc. See ld(1) for load-time options. -c Suppress the loading phase of the compilation, and force an object file to be produced even if only one program is compiled. -w Suppress warning diagnostics. -p Arrange for the compiler to produce code which counts the number of times each routine is called. If loading takes place, replace the standard startup routine by one which automatically calls monitor(3) at the start and arranges to write out a mon.out file at normal termination of execution of the object program. An execution profile can then be generated by use of prof(1). -O Invoke an object-code improver. -S Compile the named C programs, and leave the assembler-language output on corresponding files suffixed `.s'. -M Run only the macro preprocessor on the named C programs, requesting it to generate Makefile dependencies and send the result to the standard output. -E Run only the macro preprocessor on the named C programs, and send the result to the standard output. -C prevent the macro preprocessor from eliding comments. -o output Name the final output file output. If this option is used the file `a.out' will be left undisturbed. -Dname=def -Dname Define the name to the preprocessor, as if by `#define'. If no definition is given, the name is defined as "1". -Uname Remove any initial definition of name. -Idir `#include' files whose names do not begin with `/' are always sought first in the directory of the file argument, then in directo- ries named in -I options, then in directories on a standard list. -Ldir Library archives are sought first in directories named in -L options, then in directories on a standard list. -Bstring Find substitute compiler passes in the files named string with the suffixes cpp, c0, c1 and c2. If string is empty, use a standard backup version. -t[p012] Find only the designated compiler passes in the files whose names are constructed by a -B option. In the absence of a -B option, the string is taken to be `/usr/c/'. Other arguments are taken to be either loader option arguments, or C-compatible object programs, typically produced by an earlier cc run, or perhaps libraries of C-compatible routines. These programs, together with the results of any compilations specified, are loaded (in the order given) to produce an executable program with name a.out. FILES
file.c input file file.o object file a.out loaded output /tmp/ctm? temporary /lib/cpp preprocessor /lib/c[01] compiler /lib/c2 optional optimizer /lib/crt0.o runtime startoff /lib/mcrt0.o startoff for profiling /lib/libc.a standard library, see intro(3) /usr/lib/libc_p.aprofiling library, see intro(3) /usr/include standard directory for `#include' files mon.out file produced for analysis by prof(1) SEE ALSO
B. W. Kernighan and D. M. Ritchie, The C Programming Language, Prentice-Hall, 1978 B. W. Kernighan, Programming in C--a tutorial D. M. Ritchie, C Reference Manual monitor(3), prof(1), adb(1), ld(1), as(1) DIAGNOSTICS
The diagnostics produced by C itself are intended to be self-explanatory. Occasional messages may be produced by the assembler or loader. BUGS
The compiler currently ignores advice to put char, unsigned char, long, float, or double variables in registers. 3rd Berkeley Distribution June 7, 1985 CC(1)
All times are GMT -4. The time now is 03:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy