Menu

#109 Supporting both '%' and '#' for preprocessing

open
nobody
1
2006-04-18
2006-04-18
Anonymous
No

For the benefit of shared headers, I added the
pound/hash symbol for preprocessing directives to my
local copy a few years ago. That way the same header
can be used for both the assembly and C parts of my
mixed language project to avoid synchronizing two
separate header files.

As far as I know, the pound is still not used for
anything in NASM, so how about officially adding this
redundancy? The code change is minimal, and the
benefit is great for mixed language projects (like my
little graphics library).

Snippet from my header:

#ifdef __STDC__
#define _C_
#endif
#ifdef __cplusplus
#define _C_
#endif
//#else __NASM__ ...

#ifdef _C_
struct {
...
}
#else
struc
endstruc
#endif

Thoughts?
fdwr@hotmail.com
http://oregonstate.edu/~robinsfr

Discussion

  • nasm64developer

    nasm64developer - 2006-04-18

    Logged In: YES
    user_id=804543

    Attached find my changes which added this
    feature to the NASM64 preprocessor.

     
  • nasm64developer

    nasm64developer - 2006-04-18
    • priority: 5 --> 1
     
  • nasm64developer

    nasm64developer - 2006-04-18

    changes

     

Log in to post a comment.