Changeset 1c841bd2 in rtems


Ignore:
Timestamp:
05/27/99 16:13:19 (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
11cdbeb
Parents:
556ea0e3
Message:

Split out the routine rtems_assoc_name_bad().

Files:
5 added
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/assoc.c

    r556ea0e3 r1c841bd2  
    99#include "assoc.h"
    1010
    11 #include <stdio.h>              /* sprintf */
    1211#include <string.h>             /* strcat, strcmp */
    1312
     
    136135 */
    137136
    138 const char *
    139 rtems_assoc_name_bad(
     137const char *rtems_assoc_name_bad(
    140138    unsigned32 bad_value
    141 )
    142 {
    143 #ifdef RTEMS_DEBUG
    144     static char bad_buffer[32];
    145 
    146     sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
    147 #else
    148     static char bad_buffer[32] = "<assoc.c: BAD NAME>";
    149 #endif
    150     return bad_buffer;
    151 }
     139);
     140
     141/* body in separate file to reduce dependency on printf */
    152142
    153143
  • c/src/lib/libc/assoc.c

    r556ea0e3 r1c841bd2  
    99#include "assoc.h"
    1010
    11 #include <stdio.h>              /* sprintf */
    1211#include <string.h>             /* strcat, strcmp */
    1312
     
    136135 */
    137136
    138 const char *
    139 rtems_assoc_name_bad(
     137const char *rtems_assoc_name_bad(
    140138    unsigned32 bad_value
    141 )
    142 {
    143 #ifdef RTEMS_DEBUG
    144     static char bad_buffer[32];
    145 
    146     sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
    147 #else
    148     static char bad_buffer[32] = "<assoc.c: BAD NAME>";
    149 #endif
    150     return bad_buffer;
    151 }
     139);
     140
     141/* body in separate file to reduce dependency on printf */
    152142
    153143
  • c/src/lib/libmisc/assoc/Makefile.in

    r556ea0e3 r1c841bd2  
    1919
    2020# C source names, if any, go here -- minus the .c
    21 C_PIECES=assoc
     21C_PIECES=assoc assocnamebad
    2222C_FILES=$(C_PIECES:%=%.c)
    2323C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libmisc/assoc/assoc.c

    r556ea0e3 r1c841bd2  
    99#include "assoc.h"
    1010
    11 #include <stdio.h>              /* sprintf */
    1211#include <string.h>             /* strcat, strcmp */
    1312
     
    136135 */
    137136
    138 const char *
    139 rtems_assoc_name_bad(
     137const char *rtems_assoc_name_bad(
    140138    unsigned32 bad_value
    141 )
    142 {
    143 #ifdef RTEMS_DEBUG
    144     static char bad_buffer[32];
    145 
    146     sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
    147 #else
    148     static char bad_buffer[32] = "<assoc.c: BAD NAME>";
    149 #endif
    150     return bad_buffer;
    151 }
     139);
     140
     141/* body in separate file to reduce dependency on printf */
    152142
    153143
  • c/src/libmisc/assoc/Makefile.in

    r556ea0e3 r1c841bd2  
    1919
    2020# C source names, if any, go here -- minus the .c
    21 C_PIECES=assoc
     21C_PIECES=assoc assocnamebad
    2222C_FILES=$(C_PIECES:%=%.c)
    2323C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/libmisc/assoc/assoc.c

    r556ea0e3 r1c841bd2  
    99#include "assoc.h"
    1010
    11 #include <stdio.h>              /* sprintf */
    1211#include <string.h>             /* strcat, strcmp */
    1312
     
    136135 */
    137136
    138 const char *
    139 rtems_assoc_name_bad(
     137const char *rtems_assoc_name_bad(
    140138    unsigned32 bad_value
    141 )
    142 {
    143 #ifdef RTEMS_DEBUG
    144     static char bad_buffer[32];
    145 
    146     sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
    147 #else
    148     static char bad_buffer[32] = "<assoc.c: BAD NAME>";
    149 #endif
    150     return bad_buffer;
    151 }
     139);
     140
     141/* body in separate file to reduce dependency on printf */
    152142
    153143
  • cpukit/libcsupport/src/assoc.c

    r556ea0e3 r1c841bd2  
    99#include "assoc.h"
    1010
    11 #include <stdio.h>              /* sprintf */
    1211#include <string.h>             /* strcat, strcmp */
    1312
     
    136135 */
    137136
    138 const char *
    139 rtems_assoc_name_bad(
     137const char *rtems_assoc_name_bad(
    140138    unsigned32 bad_value
    141 )
    142 {
    143 #ifdef RTEMS_DEBUG
    144     static char bad_buffer[32];
    145 
    146     sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
    147 #else
    148     static char bad_buffer[32] = "<assoc.c: BAD NAME>";
    149 #endif
    150     return bad_buffer;
    151 }
     139);
     140
     141/* body in separate file to reduce dependency on printf */
    152142
    153143
Note: See TracChangeset for help on using the changeset viewer.