summaryrefslogtreecommitdiff
path: root/src/gui_xmdlg.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-06-26 06:24:45 +0200
committerBram Moolenaar <Bram@vim.org>2010-06-26 06:24:45 +0200
commit644044794ea55fdee8599ee1e861234216c20402 (patch)
tree9dfe2fa4bae0f9914f0d12f7a502aaffc1795c43 /src/gui_xmdlg.c
parent0eda7ac7f897433c9d346743bf38fcd291673070 (diff)
downloadvim-git-644044794ea55fdee8599ee1e861234216c20402.tar.gz
Various small fixes from Dominique Pelle.
Diffstat (limited to 'src/gui_xmdlg.c')
-rw-r--r--src/gui_xmdlg.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui_xmdlg.c b/src/gui_xmdlg.c
index 072a53c00..1ae755e82 100644
--- a/src/gui_xmdlg.c
+++ b/src/gui_xmdlg.c
@@ -168,7 +168,7 @@ name_part(char *font, char *buf)
get_part(font, 2, buf2);
get_part(font, 1, buf3);
- if (strlen(buf3))
+ if (*buf3 != NUL)
vim_snprintf(buf, TEMP_BUF_SIZE, "%s (%s)", buf2, buf3);
else
vim_snprintf(buf, TEMP_BUF_SIZE, "%s", buf2);
@@ -225,7 +225,7 @@ size_part(char *font, char *buf, int inPixels)
if (inPixels)
{
get_part(font, 7, buf);
- if (strlen(buf) > 0)
+ if (*buf != NUL)
{
size = atoi(buf);
sprintf(buf, "%3d", size);
@@ -234,7 +234,7 @@ size_part(char *font, char *buf, int inPixels)
else
{
get_part(font, 8, buf);
- if (strlen(buf) > 0)
+ if (*buf != NUL)
{
size = atoi(buf);
temp = (float)size / 10.0;
@@ -261,7 +261,7 @@ encoding_part(char *font, char *buf)
get_part(font, 13, buf1);
get_part(font, 14, buf2);
- if (strlen(buf1) > 0 && strlen(buf2))
+ if (*buf1 != NUL && *buf2 != NUL)
vim_snprintf(buf, TEMP_BUF_SIZE, "%s-%s", buf1, buf2);
if (!strcmp(buf, " "))
strcpy(buf, "-");
@@ -1229,10 +1229,10 @@ gui_xm_select_font(char_u *current)
size_part(found, sizebuf, data->in_pixels);
encoding_part(found, encodingbuf);
- if (strlen(namebuf) > 0
- && strlen(stylebuf) > 0
- && strlen(sizebuf) > 0
- && strlen(encodingbuf) > 0)
+ if (*namebuf != NUL
+ && *stylebuf != NUL
+ && *sizebuf != NUL
+ && *encodingbuf != NUL)
{
data->sel[NAME] = XtNewString(namebuf);
data->sel[STYLE] = XtNewString(stylebuf);