Mercurial > vim
comparison src/os_msdos.c @ 418:84825cc6f049
updated for version 7.0109
author | vimboss |
---|---|
date | Mon, 18 Jul 2005 21:47:53 +0000 |
parents | 3a21825ad207 |
children | cd3689efd90a |
comparison
equal
deleted
inserted
replaced
417:8f41fe56e2fc | 418:84825cc6f049 |
---|---|
1513 int len, | 1513 int len, |
1514 int force) | 1514 int force) |
1515 { | 1515 { |
1516 if (!force && mch_isFullName(fname)) /* already expanded */ | 1516 if (!force && mch_isFullName(fname)) /* already expanded */ |
1517 { | 1517 { |
1518 STRNCPY(buf, fname, len); | 1518 vim_strncpy(buf, fname, len - 1); |
1519 buf[len - 1] = NUL; | |
1520 slash_adjust(buf); | 1519 slash_adjust(buf); |
1521 return OK; | 1520 return OK; |
1522 } | 1521 } |
1523 | 1522 |
1524 #ifdef __BORLANDC__ /* Only Borland C++ has this */ | 1523 #ifdef __BORLANDC__ /* Only Borland C++ has this */ |
1531 char_u fullpath[MAXPATHL]; | 1530 char_u fullpath[MAXPATHL]; |
1532 | 1531 |
1533 if (!_truename(fname, fullpath)) | 1532 if (!_truename(fname, fullpath)) |
1534 return FAIL; | 1533 return FAIL; |
1535 slash_adjust(fullpath); /* Only needed when 'shellslash' set */ | 1534 slash_adjust(fullpath); /* Only needed when 'shellslash' set */ |
1536 STRNCPY(buf, fullpath, len); | 1535 vim_strncpy(buf, fullpath, len - 1); |
1537 buf[len - 1] = NUL; | |
1538 return OK; | 1536 return OK; |
1539 | 1537 |
1540 # else /* Old code, to be deleted... */ | 1538 # else /* Old code, to be deleted... */ |
1541 int l; | 1539 int l; |
1542 char_u olddir[MAXPATHL]; | 1540 char_u olddir[MAXPATHL]; |
3072 mch_get_host_name( | 3070 mch_get_host_name( |
3073 char_u *s, | 3071 char_u *s, |
3074 int len) | 3072 int len) |
3075 { | 3073 { |
3076 #ifdef DJGPP | 3074 #ifdef DJGPP |
3077 STRNCPY(s, "PC (32 bits Vim)", len); | 3075 vim_strncpy(s, "PC (32 bits Vim)", len - 1); |
3078 #else | 3076 #else |
3079 STRNCPY(s, "PC (16 bits Vim)", len); | 3077 vim_strncpy(s, "PC (16 bits Vim)", len - 1); |
3080 #endif | 3078 #endif |
3081 s[len - 1] = NUL; /* make sure it's terminated */ | 3079 } |
3082 } |