rax_condef_get_ref

char * rax_condef_get_ref(char * key);
 

Get a reference to a condef (conditional define) value. Condef's are like environment variables. Once set (from the command line or using the API function rax_condef_put() this value can be used to change the behavior of a Rax program. For example, if condef __OUTPUT__ has been set to "dense". Some external function could use this knowledge to generate more dense output. For example by using something along the lines of the following C code snipped:

    if (*rax_condef_get_ref("OUTPUT") != 'd') {
      /* Not in dense mode, so be more verbose. */
      fprintf(fp, "\n");                /* End of line. */
      fprintf(fp, "%*s", i_level, "");  /* Indent line. */
    }
       

This C pre-processor like mechanism allows for conditional behavior. It is used, for example, by the web IDE to optimize the output of SVG output. The alter ego of this function is rax_condef_put(), see above.