]> diplodocus.org Git - nmh/blob - sbr/m_name.c
mhbuildsbr.c: Flip logic, moving goto to then-block; no need for else.
[nmh] / sbr / m_name.c
1 /* m_name.c -- return a message number as a string
2 *
3 * This code is Copyright (c) 2002, by the authors of nmh. See the
4 * COPYRIGHT file in the root directory of the nmh distribution for
5 * complete copyright information.
6 */
7
8 #include <limits.h>
9 #include <h/mh.h>
10 #include <h/utils.h>
11
12 #define STR(s) #s
13 #define SIZE(n) (sizeof STR(n)) /* Includes NUL. */
14
15 char *
16 m_name (int num)
17 {
18 if (num <= 0) return "?";
19
20 return m_strn(num, SIZE(INT_MAX));
21 }