[geany/geany] 776c77: Use GLib version of C99's snprintf()
Colomban Wendling
git-noreply at xxxxx
Mon Apr 22 18:18:18 UTC 2013
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Mon, 22 Apr 2013 18:18:18 UTC
Commit: 776c77d6b68e35d762593c9513192871aebbb837
https://github.com/geany/geany/commit/776c77d6b68e35d762593c9513192871aebbb837
Log Message:
-----------
Use GLib version of C99's snprintf()
Modified Paths:
--------------
src/highlighting.c
Modified: src/highlighting.c
6 files changed, 4 insertions(+), 2 deletions(-)
===================================================================
@@ -30,6 +30,8 @@
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
+#include <glib.h>
+#include <glib/gprintf.h>
#include "SciLexer.h"
#include "highlighting.h"
@@ -243,11 +245,11 @@ static void parse_color(GKeyFile *kf, const gchar *str, gint *clr)
if (strlen(start) == 3)
{
- snprintf(hex_clr, 9, "0x%c%c%c%c%c%c", start[0], start[0],
+ g_snprintf(hex_clr, 9, "0x%c%c%c%c%c%c", start[0], start[0],
start[1], start[1], start[2], start[2]);
}
else
- snprintf(hex_clr, 9, "0x%s", start);
+ g_snprintf(hex_clr, 9, "0x%s", start);
g_free(named_color);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list