all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: Using strcasecmp in xterm.c
Date: Thu, 07 Dec 2006 14:06:56 +0100	[thread overview]
Message-ID: <m364cng8i7.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <E1GsHF3-0000V5-4D@etlken.m17n.org> (Kenichi Handa's message of "Thu\, 07 Dec 2006 20\:16\:41 +0900")

Kenichi Handa <handa@m17n.org> writes:

> In article <m3odqgf4y2.fsf@kfs-l.imdomain.dk>, storm@cua.dk (Kim F. Storm) writes:
>
>> In xterm.c, we use strcasecmp here:
>
>> struct font_info *
>> x_query_font (f, fontname)
>>      struct frame *f;
>>      register char *fontname;
>> {
>>   struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
>>   int i;
>
>>   for (i = 0; i < dpyinfo->n_fonts; i++)
>>     if (dpyinfo->font_table[i].name
>> 	&& (!strcasecmp (dpyinfo->font_table[i].name, fontname)
>> 	    || !strcasecmp (dpyinfo->font_table[i].full_name, fontname)))
>>       return (dpyinfo->font_table + i);
>>   return NULL;
>> }
>
>
>> Shouldn't this use xstricmp which is specifically defined to compare
>> fontnames according to the comment in xfaces.c ?
>
> What is the difference between xstricmp and strcasecmp?

I dunno -- but strcasecmp doesn't exist on all systems (I just learned
that), and xstricmp comes with Emacs, so it seems safer to use it.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2006-12-07 13:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-07  9:09 Using strcasecmp in xterm.c Kim F. Storm
2006-12-07 11:16 ` Kenichi Handa
2006-12-07 13:06   ` Kim F. Storm [this message]
2006-12-08  1:02     ` Kenichi Handa
2006-12-07 21:41   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m364cng8i7.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.