summaryrefslogtreecommitdiffstats
path: root/src/gui_mac.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-07-18 21:47:53 +0000
committerBram Moolenaar <Bram@vim.org>2005-07-18 21:47:53 +0000
commitbbebc857507f24c82cd5bb2f80305b74390b4611 (patch)
tree4c1a949017d7975cb3e61b246783369bb529d53d /src/gui_mac.c
parentfe3ca8ddd9b85240387b6fa7934af3317e25b731 (diff)
updated for version 7.0109
Diffstat (limited to 'src/gui_mac.c')
-rw-r--r--src/gui_mac.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gui_mac.c b/src/gui_mac.c
index 70393be1a7..8f54249595 100644
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -3865,8 +3865,7 @@ gui_mch_init_font(font_name, fontset)
else
{
font = gui_mac_find_font(font_name);
- STRNCPY(used_font_name, font_name, sizeof(used_font_name));
- used_font_name[sizeof(used_font_name) - 1] = NUL;
+ vim_strncpy(used_font_name, font_name, sizeof(used_font_name) - 1);
if (font == NOFONT)
return FAIL;
@@ -6201,8 +6200,7 @@ gui_mch_dialog(
if (name[0] > IOSIZE)
name[0] = IOSIZE - 1;
#endif
- STRNCPY(textfield, &name[1], name[0]);
- textfield[name[0]] = NUL;
+ vim_strncpy(textfield, &name[1], name[0]);
}
/* Restore the original graphical port */
@@ -6522,8 +6520,7 @@ char_u *FullPathFromFSSpec_save(FSSpec file)
#endif
/* Start filling fname with file.name */
- STRNCPY(filenamePtr, &file.name[1], file.name[0]);
- filenamePtr[file.name[0]] = 0; /* NULL terminate the string */
+ vim_strncpy(filenamePtr, &file.name[1], file.name[0]);
/* Get the info about the file specified in FSSpec */
theCPB.dirInfo.ioFDirIndex = 0;
@@ -6625,8 +6622,7 @@ char_u *FullPathFromFSSpec_save(FSSpec file)
/* Put the new directoryName in front of the current fname */
STRCPY(temporaryPtr, filenamePtr);
- STRNCPY(filenamePtr, &directoryName[1], directoryName[0]);
- filenamePtr[directoryName[0]] = 0; /* NULL terminate the string */
+ vim_strncpy(filenamePtr, &directoryName[1], directoryName[0]);
STRCAT(filenamePtr, ":");
STRCAT(filenamePtr, temporaryPtr);
}
@@ -6660,8 +6656,7 @@ char_u *FullPathFromFSSpec_save(FSSpec file)
{
/* Add the volume name */
STRCPY(temporaryPtr, filenamePtr);
- STRNCPY(filenamePtr, &directoryName[1], directoryName[0]);
- filenamePtr[directoryName[0]] = 0; /* NULL terminate the string */
+ vim_strncpy(filenamePtr, &directoryName[1], directoryName[0]);
STRCAT(filenamePtr, ":");
STRCAT(filenamePtr, temporaryPtr);