Ignore:
Timestamp:
Mar 18, 2006 12:26:55 PM (18 years ago)
Author:
bennylp
Message:

Added option to disable error message altogether, to save space footprint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/errno.c

    r315 r330  
    4040 
    4141/* PJLIB's own error codes/messages */ 
     42#if defined(PJ_HAS_ERROR_STRING) && PJ_HAS_ERROR_STRING!=0 
    4243static const struct  
    4344{ 
     
    6364    { PJ_EEOF,          "End of file" }, 
    6465}; 
     66#endif  /* PJ_HAS_ERROR_STRING */ 
     67 
    6568 
    6669/* 
     
    7174static int pjlib_error(pj_status_t code, char *buf, pj_size_t size) 
    7275{ 
     76#if defined(PJ_HAS_ERROR_STRING) && PJ_HAS_ERROR_STRING!=0 
    7377    unsigned i; 
    7478 
     
    8286        } 
    8387    } 
     88#endif 
    8489 
    85     *buf++ = '?'; 
    86     *buf++ = '?'; 
    87     *buf++ = '?'; 
    88     *buf++ = '\0'; 
    89     return 3; 
     90    return pj_ansi_snprintf( buf, size, "Unknown pjlib error %d", code); 
    9091} 
    9192 
Note: See TracChangeset for help on using the changeset viewer.