+2001-05-06 [hoa]
+
+ * src/utils.[ch]
+ added function itos_buf() to enable use of several buffers
+ * src/summaryview.c
+ use of itos_buf() instead of itos() in summary list
+ to fix the broken display of message number.
+
2001-05-06 [alfons]
* src/gtkstext.c: bug in cursor up navigation fixed,
{
static gchar date_modified[80];
static gchar *to = NULL;
+ static gchar col_number[11];
+ static gchar col_score[11];
text[S_COL_MARK] = NULL;
text[S_COL_UNREAD] = NULL;
text[S_COL_MIME] = NULL;
- text[S_COL_NUMBER] = itos(msginfo->msgnum);
+ text[S_COL_NUMBER] = itos_buf(col_number, msginfo->msgnum);
text[S_COL_SIZE] = to_human_readable(msginfo->size);
- text[S_COL_SCORE] = itos(msginfo->score);
+ text[S_COL_SCORE] = itos_buf(col_score, msginfo->score);
if (msginfo->date_t) {
procheader_date_get_localtime(date_modified,
return atoi(nstr);
}
-/* convert integer into string */
+/* convert integer into string
+ nstr must be a 11 characters table
+*/
+gchar *itos_buf(gchar nstr[], gint n)
+{
+ g_snprintf(nstr, 11, "%d", n);
+ return nstr;
+}
+
+/* convert integer into string
+ use an internal static buffer */
gchar *itos(gint n)
{
static gchar nstr[11];
- g_snprintf(nstr, 11, "%d", n);
- return nstr;
+ return itos_buf(nstr, n);
}
gchar *to_human_readable(off_t size)
/* number-string conversion */
gint to_number (const gchar *nstr);
gchar *itos (gint n);
+gchar *itos_buf (gchar nstr[], gint n);
gchar *to_human_readable (off_t size);
/* alternative string functions */