C-like Stuff

In the AWK libraries provided by CSA, I have occasionally tried and mimic C concepts. For instance, in $CSA_INSTALL/lib/include/ there are functions like _strdup(), _ctime(), _stat(), _creat() and others, that try and behave somewhat like their C-library counterparts. The similarities are rough at best, so do not expect to use those functions exactly in the same way as you would do in a real C program, but I simply liked the idea. Beside C-like function names, I have also tried and use C-like error codes. To date, the following Linux-style symbolic error codes have been defined (see errno(3) and <errno.h> for more info):

 _ENOENT        =   2 
 _EIO           =   5 
 _EACCES        =  13 
 _EISDIR        =  21 
 _EINVAL        =  22 
 _ENOMSG        =  42 
 _EMSGSIZE      =  90 

Trackbacks (0) | New trackback | Print