Browse Source

inperror.c: indentations

pre-master-46
h_vogt 13 years ago
parent
commit
07ec7bd412
  1. 32
      src/spicelib/parser/inperror.c

32
src/spicelib/parser/inperror.c

@ -3,7 +3,7 @@ Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
**********/
/*
/*
* provide the error message appropriate for the given error code
*/
@ -30,29 +30,29 @@ char *INPerror(int type)
const char *val;
char *ebuf;
/*CDHW Lots of things set errMsg but it is never used so let's hack it in CDHW*/
/*CDHW Lots of things set errMsg but it is never used so let's hack it in CDHW*/
if ( errMsg ) {
val = errMsg; errMsg = NULL;}
else
/*CDHW end of hack CDHW*/
val = SPerror(type);
val = errMsg;
errMsg = NULL;
} else
/*CDHW end of hack CDHW*/
val = SPerror(type);
if (!val)
return NULL;
return NULL;
#ifdef HAVE_ASPRINTF
if (errRtn)
asprintf(&ebuf, "%s detected in routine \"%s\"\n", val, errRtn);
asprintf(&ebuf, "%s detected in routine \"%s\"\n", val, errRtn);
else
asprintf(&ebuf, "%s\n", val);
asprintf(&ebuf, "%s\n", val);
#else /* ~ HAVE_ASPRINTF */
if (errRtn){
ebuf = TMALLOC(char, strlen(val) + strlen(errRtn) + 25);
sprintf(ebuf, "%s detected in routine \"%s\"\n", val, errRtn);
}
else{
ebuf = TMALLOC(char, strlen(val) + 2);
sprintf(ebuf, "%s\n", val);
if (errRtn) {
ebuf = TMALLOC(char, strlen(val) + strlen(errRtn) + 25);
sprintf(ebuf, "%s detected in routine \"%s\"\n", val, errRtn);
} else {
ebuf = TMALLOC(char, strlen(val) + 2);
sprintf(ebuf, "%s\n", val);
}
#endif /* HAVE_ASPRINTF */
FREE(errMsg); /* pn: really needed ? */

Loading…
Cancel
Save