`const' qualifier for char* arguments of vec_get() and ft_substdef()

This commit is contained in:
rlar 2010-07-16 17:00:45 +00:00
parent a0a7d0ca70
commit ff459393d0
7 changed files with 17 additions and 9 deletions

View File

@ -1,3 +1,11 @@
2010-07-16 Robert Larice
* src/ngsconvert.c ,
* src/frontend/define.c ,
* src/frontend/define.h ,
* src/frontend/vectors.c ,
* src/frontend/vectors.h ,
* src/include/fteext.h :
2010-07-16 Robert Larice
* src/xspice/icm/xtraevt/d_to_real/cfunc.mod ,
* src/xspice/icm/xtraevt/real_delay/cfunc.mod ,

View File

@ -262,7 +262,7 @@ prtree1(struct pnode *pn, FILE *fp)
}
struct pnode *
ft_substdef(char *name, struct pnode *args)
ft_substdef(const char *name, struct pnode *args)
{
struct udfunc *udf;
struct pnode *tp;

View File

@ -7,7 +7,7 @@
#define DEFINE_H_INCLUDED
void com_define(wordlist *wlist);
struct pnode * ft_substdef(char *name, struct pnode *args);
struct pnode * ft_substdef(const char *name, struct pnode *args);
void com_undefine(wordlist *wlist);

View File

@ -303,15 +303,15 @@ vec_fromplot(char *word, struct plot *plot)
#define SPECCHAR '@'
struct dvec *
vec_get(char *word)
vec_get(const char *vec_name)
{
struct dvec *d, *end = NULL, *newv = NULL;
struct plot *pl;
char buf[BSIZE_SP], *s, *wd, *whole, *name = NULL, *param;
char buf[BSIZE_SP], *s, *wd, *word, *whole, *name = NULL, *param;
int i = 0;
struct variable *vv;
wd = word = copy(word); /* Gets mangled below... */
wd = word = copy(vec_name); /* Gets mangled below... */
if (index(word, '.')) {
/* Snag the plot... */

View File

@ -11,7 +11,7 @@ void ft_loadfile(char *file);
void plot_add(struct plot *pl);
void vec_remove(char *name);
struct dvec * vec_fromplot(char *word, struct plot *plot);
struct dvec * vec_get(char *word);
struct dvec * vec_get(const char *word);
void plot_docoms(wordlist *wl);
struct dvec * vec_copy(struct dvec *v);
struct plot * plot_alloc(char *name);

View File

@ -150,7 +150,7 @@ extern void com_state(wordlist *wl);
/* define.c */
extern struct pnode *ft_substdef(char *name, struct pnode *args);
extern struct pnode *ft_substdef(const char *name, struct pnode *args);
extern void com_define(wordlist *wl);
extern void com_undefine(wordlist *wl);
extern void ft_pnode(struct pnode *pn);
@ -459,7 +459,7 @@ extern bool vec_eq(struct dvec *v1, struct dvec *v2);
extern int plot_num;
extern struct dvec *vec_fromplot(char *word, struct plot *plot);
extern struct dvec *vec_copy(struct dvec *v);
extern struct dvec *vec_get(char *word);
extern struct dvec *vec_get(const char *word);
extern struct dvec *vec_mkfamily(struct dvec *v);
extern struct plot *plot_cur;
extern struct plot *plot_alloc(char *name);

View File

@ -446,7 +446,7 @@ void out_printf(char *fmt, ...) { }
#endif
void out_send(char *string) {}
struct variable * cp_enqvar(char *word) { return (NULL); }
struct dvec *vec_get(char *word) { return (NULL); }
struct dvec *vec_get(const char *word) { return (NULL); }
void cp_ccom(wordlist *w, char *b, bool e) { return; }
int cp_usrset(struct variable *v, bool i) { return(US_OK); }