Jspice3
inperrc.c
Go to the documentation of this file.
1 /***************************************************************************
2 JSPICE3 adaptation of Spice3e2 - Copyright (c) Stephen R. Whiteley 1992
3 Copyright 1990 Regents of the University of California. All rights reserved.
4 Authors: 1987 Thomas L. Quarles
5  1992 Stephen R. Whiteley
6 ****************************************************************************/
7 
8 #include "spice.h"
9 #include "inpdefs.h"
10 #include "misc.h"
11 
12 
13 char *
15 
16 char *a;
17 char *b;
18 {
19 char *errtmp;
20 
21  if (a != (char *)NULL) {
22  if (b == (char *)NULL)
23  /* a valid, b null, return a */
24  return (a);
25 
26  else { /* both valid - hard work...*/
27  errtmp = (char *)tmalloc( (strlen(a) + strlen(b)+2)*sizeof(char));
28  (void) strcpy(errtmp,a);
29  (void) strcat(errtmp,"\n");
30  (void) strcat(errtmp,b);
31  txfree(a);
32  txfree(b);
33  return (errtmp);
34  }
35  }
36  else
37  /* a null, so return b */
38  return (b);
39 }
40 
41 
42 char *
44 
45 char *str;
46 {
47  static char buf[64];
48 
49  if (str)
50  sprintf(buf,"Device type %s not available in this binary.",str);
51  else
52  sprintf(buf,"Incorrect model type.");
53  return (buf);
54 }
static char buf[MAXPROMPT]
Definition: arg.c:18
char * strcpy()
char * INPdevErr(char *str)
Definition: inperrc.c:43
char * tmalloc()
void txfree()
#define NULL
Definition: spdefs.h:121
Definition: sced.h:120
char * INPerrCat(char *a, char *b)
Definition: inperrc.c:14