From: Hans-Bernhard B. <br...@us...> - 2004-04-30 15:31:05
|
Update of /cvsroot/cscope/cscope/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5701/src Modified Files: vpinit.c Log Message: Rename argument to avoid name clash with global variable. Index: vpinit.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/vpinit.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** vpinit.c 5 May 2000 17:51:45 -0000 1.5 --- vpinit.c 30 Apr 2004 15:30:51 -0000 1.6 *************** *** 53,57 **** void ! vpinit(char *currentdir) { char *suffix; /* path from view path node */ --- 53,57 ---- void ! vpinit(char *current_dir) { char *suffix; /* path from view path node */ *************** *** 66,70 **** /* if an existing directory list is to be updated, free it */ ! if (currentdir != NULL && vpndirs > 0) { #if !NOMALLOC for (i = 0; i < vpndirs; ++i) { --- 66,70 ---- /* if an existing directory list is to be updated, free it */ ! if (current_dir != NULL && vpndirs > 0) { #if !NOMALLOC for (i = 0; i < vpndirs; ++i) { *************** *** 82,98 **** } /* if not given, get the current directory name */ ! if (currentdir == NULL && (currentdir = getcwd(buf, MAXPATH)) == NULL) { (void) fprintf(stderr, "%s: cannot get current directory name\n", argv0); return; } /* see if this directory is in the first view path node */ ! for (i = 0; vpath[i] == currentdir[i] && vpath[i] != '\0'; ++i) { ; } if ((vpath[i] != ':' && vpath[i] != '\0') || ! (currentdir[i] != '/' && currentdir[i] != '\0')) { return; } ! suffix = ¤tdir[i]; #if !NOMALLOC --- 82,98 ---- } /* if not given, get the current directory name */ ! if (current_dir == NULL && (current_dir = getcwd(buf, MAXPATH)) == NULL) { (void) fprintf(stderr, "%s: cannot get current directory name\n", argv0); return; } /* see if this directory is in the first view path node */ ! for (i = 0; vpath[i] == current_dir[i] && vpath[i] != '\0'; ++i) { ; } if ((vpath[i] != ':' && vpath[i] != '\0') || ! (current_dir[i] != '/' && current_dir[i] != '\0')) { return; } ! suffix = ¤t_dir[i]; #if !NOMALLOC |