flat assembler
Message board for the users of flat assembler.

Index > Windows > Simple command for getting missing contents from C headers

Author
Thread Post new topic Reply to topic
Matriark TerVel



Joined: 09 Aug 2005
Posts: 8
Location: Cincinnati, OH, USA
Matriark TerVel
This will extract error codes in the form
Code:
#define ERROR_CONSTANT 0L
    


and write them to errors.inc. This is useful for extracting the missing error constants from winerror.h, for instance.

Code:
tim@laptop ~ $awk '/^#define ERROR_[a-zA-Z_]+ ([0-9]+)L$/ { print $2 "\t= " substr($3,1,length($3)-1); }' /usr/cross-tools/i386-mingw32msvc/include/winerror.h > errors.inc
    

_________________
Tim
Post 18 Aug 2005, 14:59
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.