limit a name to 30 characters (26 if "xyz_" prefix precedes it) */
| 2176 | |
| 2177 | /* limit a name to 30 characters (26 if "xyz_" prefix precedes it) */ |
| 2178 | static char * |
| 2179 | macronamelimit(char *name, int pref) |
| 2180 | { |
| 2181 | static char macronametemp[32]; |
| 2182 | unsigned len = pref ? 26 : 30; |
| 2183 | |
| 2184 | #if 0 /* avoid potential warning about strncpy() not guaranteeing '\0' */ |
| 2185 | (void) strncpy(macronametemp, name, len); |
| 2186 | macronametemp[len] = '\0'; |
| 2187 | #else /* strncat() does guarantee terminating '\0' */ |
| 2188 | macronametemp[0] = '\0'; |
| 2189 | (void) strncat(macronametemp, name, len); |
| 2190 | #endif |
| 2191 | return macronametemp; |
| 2192 | } |
| 2193 | |
| 2194 | /* obsolete */ |
| 2195 | void |