Ignore:
Timestamp:
Feb 4, 2007, 1:09:12 PM (18 years ago)
Author:
bird
Message:

HAVE_SYS_CDEFS_H

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ash/bltin/printf.c

    r626 r843  
    3030 */
    3131
     32#ifdef HAVE_SYS_CDEFS_H
    3233#include <sys/cdefs.h>
     34#endif
    3335#ifndef lint
    3436#if !defined(BUILTIN) && !defined(SHELL)
     
    7779static char     *mklong(const char *, int);
    7880static void      check_conversion(const char *, const char *);
    79 static void      usage(void); 
     81static void      usage(void);
    8082
    8183static void     b_count(int);
     
    158160                 * Basic algorithm is to scan the format string for conversion
    159161                 * specifications -- once one is found, find out if the field
    160                  * width or precision is a '*'; if it is, gather up value. 
     162                 * width or precision is a '*'; if it is, gather up value.
    161163                 * Note, format strings are reused as necessary to use up the
    162                  * provided arguments, arguments of zero/null string are 
     164                 * provided arguments, arguments of zero/null string are
    163165                 * provided to use up the format string.
    164166                 */
     
    322324
    323325/*
    324  * Print SysV echo(1) style escape string 
     326 * Print SysV echo(1) style escape string
    325327 *      Halts processing string if a \c escape is encountered.
    326328 */
     
    345347                }
    346348
    347                 /* 
     349                /*
    348350                 * %b string octal constants are not like those in C.
    349                  * They start with a \0, and are followed by 0, 1, 2, 
    350                  * or 3 octal digits. 
     351                 * They start with a \0, and are followed by 0, 1, 2,
     352                 * or 3 octal digits.
    351353                 */
    352354                if (ch == '0') {
     
    390392
    391393/*
    392  * Print "standard" escape characters 
     394 * Print "standard" escape characters
    393395 */
    394396static char *
     
    519521{
    520522        static char copy[64];
    521         size_t len;     
     523        size_t len;
    522524
    523525        len = strlen(str) + 2;
     
    530532        copy[len - 2] = ch;
    531533        copy[len - 1] = '\0';
    532         return copy;   
     534        return copy;
    533535}
    534536
Note: See TracChangeset for help on using the changeset viewer.