Hi Bruce, hi list,

FYI a small gotcha I stumbled over today:

Suppose I have a template file that produces both foo.c and foo.h, and says

  #include "[+ (. header-file) +]"

somewhere. This will nicely expand to
  #include "foo.h"
in the usual cases. If I issue --select-suffix=c though, because I do
not want to regenerate foo.h right now, it expands to
  #include "/dev/null"
which is pretty irritating (and betrays the option's implementation :)

A workaround is to use

  #include "[+ (string-substitute (out-name) ".c" ".h") +]"

instead.
I am not saying this is a bug that needs fixing, but IMO it does
somewhat violate the "least-surprise" principle.

Cheers,
Dennis


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
Autogen-users mailing list
Autogen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/autogen-users

Reply via email to