From b300b1f42470b266e6eaabb05529a21d53e45ca0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 12 Jul 2012 09:58:37 -0700 Subject: [PATCH] Fix typos that broke OS X build. Reported by Randal L. Schwartz in . * nsterm.m (ns_timeout): Add missing local decl. (ns_get_color): snprintf -> sprintf, to fix typo. --- src/ChangeLog | 8 ++++++++ src/nsterm.m | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 804da9c2eef..2d661f2be09 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2012-07-12 Paul Eggert + + Fix typos that broke OS X build. + Reported by Randal L. Schwartz in + . + * nsterm.m (ns_timeout): Add missing local decl. + (ns_get_color): snprintf -> sprintf, to fix typo. + 2012-07-12 Glenn Morris * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h: diff --git a/src/nsterm.m b/src/nsterm.m index 686b748c14e..0fceb873ae2 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -416,7 +416,7 @@ ns_timeout (int usecs) /* Keep waiting until past the time wakeup. */ while (1) { - EMACS_TIME now = current_emacs_time (); + EMACS_TIME timeout, now = current_emacs_time (); if (EMACS_TIME_LE (wakeup, now)) break; timeout = sub_emacs_time (wakeup, now); @@ -1446,8 +1446,8 @@ ns_get_color (const char *name, NSColor **col) int i; scaling = strlen(name+start) / 3; for (i = 0; i < 3; i++) - snprintf (hex + i * (scaling + 1), "%.*s/", scaling, - name + start + i * scaling); + sprintf (hex + i * (scaling + 1), "%.*s/", scaling, + name + start + i * scaling); hex[3 * (scaling + 1) - 1] = '\0'; } -- 2.39.2