/***
*int printf(format, ...) - print formatted data
*
*Purpose:
* Prints formatted data on stdout using the format string to
* format data and getting as many arguments as called for
* Uses temporary buffering to improve efficiency.
* _output does the real work here
*
*Entry:
* char *format - format string to control data format/number of arguments
* followed by list of arguments, number and type controlled by
* format string
*
*Exit:
* returns number of characters printed
*
*Exceptions:
*
*******************************************************************************/
int __cdecl printf (
const char *format,
...
)
/*
* stdout 'PRINT', 'F'ormatted
*/
{
va_list arglist;
int buffing;
int retval;
我先贴一个函数来证明一下。
/***
*strdup.c - duplicate a string in malloc'd memory
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* defines _strdup() - grab new memory, and duplicate the string into it.
*
*******************************************************************************/
/***
*char *_strdup(string) - duplicate string into malloc'd memory
*
*Purpose:
* Allocates enough storage via malloc() for a copy of the
* string, copies the string into the new memory, and returns
* a pointer to it.
*
*Entry:
* char *string - string to copy into new memory
*
*Exit:
* returns a pointer to the newly allocated storage with the
* string in it.
*
* returns NULL if enough memory could not be allocated, or
* string was NULL.
*
*Uses:
*
*Exceptions:
*
*******************************************************************************/