Ignore:
Timestamp:
May 18, 2008, 8:13:45 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • Start working on the internal code documentation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/libzzuf.c

    r1858 r2336  
    5555#endif
    5656
    57 /* Global variables */
     57/**
     58 * Is libzzuf fully initialised?
     59 */
    5860int   _zz_ready    = 0;
     61
     62/**
     63 * The file descriptor used by libzzuf for communication with the main
     64 * zzuf program in debug mode. Its value is set by the ZZUF_DEBUG
     65 * environment variable.
     66 */
    5967int   _zz_debugfd  = -1;
     68
     69/**
     70 * If set to 1, this boolean variable will prevent the called application
     71 * from installing signal handlers that would prevent it from really crashing.
     72 * SDL applications often do that when not using SDL_INIT_NOPARACHUTE, for
     73 * instance. Its value is set by the ZZUF_SIGNAL environment variable.
     74 */
    6075int   _zz_signal   = 0;
     76
     77/**
     78 * If set to a positive value, this value will indicate the maximum number
     79 * of megabytes that the called application will be allowed to allocate. Its
     80 * value is set by the ZZUF_MEMORY environment variable.
     81 */
    6182int   _zz_memory   = 0;
     83
     84/**
     85 * If set to 1, this boolean will tell libzzuf to fuzz network file
     86 * descriptors, too. Its value is set by the ZZUF_NETWORK environment
     87 * variable.
     88 */
    6289int   _zz_network  = 0;
    6390
    64 /* Library initialisation shit */
     91/**
     92 * Library initialisation routine.
     93 *
     94 * This function reads all configuration variables put by zzuf in the
     95 * called process's environment and initialises diversions for the three
     96 * main function families: memory functions (initialised very early because
     97 * other functions we need such as dlsym() require them), file descriptor
     98 * functions and stream functions.
     99 */
    65100void _zz_init(void)
    66101{
     
    139174}
    140175
    141 /* Deinitialisation */
     176/**
     177 * Library deinitialisation routine.
     178 *
     179 * Free all the memory allocated by libzzuf during its lifetime.
     180 */
    142181void _zz_fini(void)
    143182{
     
    164203}
    165204#endif
     205
Note: See TracChangeset for help on using the changeset viewer.