Mercurial > vim
comparison src/if_cscope.c @ 12:bdeee1504ac1
updated for version 7.0004
author | vimboss |
---|---|
date | Fri, 02 Jul 2004 15:38:35 +0000 |
parents | 3fc0f57ecb91 |
children | 125e80798a85 |
comparison
equal
deleted
inserted
replaced
11:4424b47a0797 | 12:bdeee1504ac1 |
---|---|
432 char *arg1; /* filename - may contain environment variables */ | 432 char *arg1; /* filename - may contain environment variables */ |
433 char *arg2; /* prepend path - may contain environment variables */ | 433 char *arg2; /* prepend path - may contain environment variables */ |
434 char *flags; | 434 char *flags; |
435 { | 435 { |
436 struct stat statbuf; | 436 struct stat statbuf; |
437 int ret; | 437 int ret; |
438 char *fname = NULL; | 438 char *fname = NULL; |
439 char *fname2 = NULL; | 439 char *fname2 = NULL; |
440 char *ppath = NULL; | 440 char *ppath = NULL; |
441 int i; | 441 int i; |
442 | 442 |
443 /* get the filename (arg1), expand it, and try to stat it */ | 443 /* get the filename (arg1), expand it, and try to stat it */ |
444 if ((fname = (char *)alloc(MAXPATHL+1)) == NULL) | 444 if ((fname = (char *)alloc(MAXPATHL + 1)) == NULL) |
445 goto add_err; | 445 goto add_err; |
446 | 446 |
447 expand_env((char_u *)arg1, (char_u *)fname, MAXPATHL); | 447 expand_env((char_u *)arg1, (char_u *)fname, MAXPATHL); |
448 ret = stat(fname, &statbuf); | 448 ret = stat(fname, &statbuf); |
449 if (ret < 0) | 449 if (ret < 0) |
457 /* get the prepend path (arg2), expand it, and try to stat it */ | 457 /* get the prepend path (arg2), expand it, and try to stat it */ |
458 if (arg2 != NULL) | 458 if (arg2 != NULL) |
459 { | 459 { |
460 struct stat statbuf2; | 460 struct stat statbuf2; |
461 | 461 |
462 if ((ppath = (char *)alloc(MAXPATHL+1)) == NULL) | 462 if ((ppath = (char *)alloc(MAXPATHL + 1)) == NULL) |
463 goto add_err; | 463 goto add_err; |
464 | 464 |
465 expand_env((char_u *)arg2, (char_u *)ppath, MAXPATHL); | 465 expand_env((char_u *)arg2, (char_u *)ppath, MAXPATHL); |
466 ret = stat(ppath, &statbuf2); | 466 ret = stat(ppath, &statbuf2); |
467 if (ret < 0) | 467 if (ret < 0) |