Changeset 267 for trunk/src/xml_error.c


Ignore:
Timestamp:
Mar 20, 2009, 12:18:53 PM (10 years ago)
Author:
ksherdy
Message:

Construct and pass string literals as read only (const char *) types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/xml_error.c

    r156 r267  
    2424
    2525
    26 void NoEncodingError(char * msg) {
     26void NoEncodingError(const char * msg) {
    2727        fprintf(stderr, "Error : %s\n", msg);
    2828        exit(-1);
    2929}
    3030
    31 void EncodingError(char * msg, unsigned char * encoding, int lgth) {
     31void EncodingError(const char * msg, unsigned char * encoding, int lgth) {
    3232        fprintf(stderr, "Error : Illegal/unsupported %s encoding of length %i: \"", msg, lgth);
    3333        for (int i = 0; i < lgth; i++) fprintf(stderr, "%c", encoding[i]);
    34         fprintf(stderr, "\"\n"); 
     34        fprintf(stderr, "\"\n");
    3535        exit(-1);
    3636}
    3737
    38 void CharSetValidationError(char * encoding, int err_pos) {
     38void CharSetValidationError(const char * encoding, int err_pos) {
    3939        fprintf(stderr, "Error: Invalid %s character in input stream at position %i\n", encoding, err_pos);
    4040        exit(-1);
     
    5656}
    5757
    58 void ImplementationLimitError(char * msg) {
     58void ImplementationLimitError(const char * msg) {
    5959        fprintf(stderr, "Fatal implementation limit - %s\n", msg);
    6060        exit(-1);
Note: See TracChangeset for help on using the changeset viewer.