c ×Ö·û´®´¦Àíº¯Êý strtok Ô´Âë
/***
*strtok.c - tokenize a string with given delimiters
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* defines strtok() - breaks string into series of token
* via repeated calls.
*
*******************************************************************************/
#include
#include
#ifdef _SECURE_VERSION
#include
#else /* _SECURE_VERSION */
#include
#endif /* _SECURE_VERSION */
/***
*char *strtok(string, control) - tokenize string with delimiter in control
*
*Purpose:
* strtok considers the string to consist of a sequence of zero or more
* text tokens separated by spans of one or more control chars. the first
* call, with string specified, returns a pointer to the first char of the
* first token, and will write a null char into string immediately
* following the returned token. subsequent calls with zero for the first
* argument (string) will work thru the string until no tokens remain. the
* control string may be different from call to call. when no tokens remain
* in string a NULL pointer is returned. remember the control chars with a
* bit map, one bit per ascii char. the null char is always a control char.
*
*Entry:
* char *string - string to tokenize, or NULL to get next token
* char *control - string of characters to use as delimiters
*
*Exit:
* returns pointer to first token in string, or if string
* was NULL, to next token
* returns NULL when no more tokens remain.
*
*Uses:
*
*Exceptions:
*
*******************************************************************************/
#ifdef _SECURE_VERSION
#define _TOKEN *context
#else /* _SECURE_VERSION */
#define _TOKEN ptd->_token
#endif /* _SECURE_VERSION */
#ifdef _SECURE_VERSION
char * __cdecl strtok_s (
char * string,
const char * control,
char ** context
)
#else /* _SECURE_VERSION */
char *
Ïà¹ØÎĵµ£º
ÔÚÇ°ÃæµÄ»ù´¡ÉÏ£¬ÏÂÃæ¿ªÊ¼ÀûÓÃskyeye×Ô´øµÄtestsuitesÖеÄ×ÊÔ´À´ÔËÐÐ×Ô¼ºµÄ³ÌÐòµÄ·½·¨
1.Ê×ÏÈÊÇÏÂÔØÏÂÔØskyeye-1.2.5_REL.tar.gz£¬È»ºó½âѹ¸ÃÎļþ
2.ʹÓÃskyeyeÄ£Äâ°å×Ós3c2410ÔËÐÐij¸ölinux
Ê×ÏȽøÈë½âѹÍêµÄĿ¼£¬È»ºó
cd ./linux/s3c2410/s3c2410x-2.6.14
skyeye –c skyeye.conf –e vmlinux
×¢ÒâµÄÊÇs ......
CÏÝÚåÓÚȱÏÝÕâ±¾Ê鵽ͼÊé¹Ý½èÁ˺ܾã¬Ò»Ö±¶¼Ã»ÓÐϸϸµÄ¿´£¬ÏÖÍêÕûµÄ¿´ÁËÖ®ºó°ÑÈÏÎªÖØÒªµÄ£¬Ò»°ãÈË¿ÉÄܺöÊÓµÄÎÊÌâ¸ø×öÁ˱ʼǣ¬Ï£ÍûÓÐËù°ïÖú
2010.02.25
¶þάÊý×é:
int calendar[12][31];
int * p;
int i;
calendar[4]µÄº¬Ò壺
calendar[4]ÊÇcalendarÊý×éµÄµÚ5¸öÔªËØ£¬ÊÇcalendarÊý×éÖÐ12¸öÓÐ×Å31¸öÕûÐÍÔªËØµÄÊý×éÖ®Ò» ......
µÚÒ»¸öÎÊÌ⣬°ÙÇ®°Ù¼¦£¬囧µ½ÁË
#include<stdio.h>
void main()
{
int cocks=0,hens=0,chicks=0;
while(cocks<=19)
{
while(hens<=33)
{
chicks=100-cocks-hens;
if((cocks+hens+chicks==100)&&(cocks*5+hens*3+chicks/3==100))
printf("cocks= ......
C±ê×¼ÖÐÖ¸¶¨ÁËһЩԤ¶¨ÒåµÄºê£¬¶ÔÓÚ±à³Ì¾³£»áÓõ½¡£ÏÂÃæÕâ¸ö±íÖоÍÊÇһЩ³£³£Óõ½µÄÔ¤¶¨Òåºê¡£
__DATE__
½øÐÐÔ¤´¦ÀíµÄÈÕÆÚ£¨“Mmm dd yyyy”ÐÎʽµÄ×Ö·û´®ÎÄ×Ö£©
__FILE__
´ú±íµ±Ç°Ô´´úÂëÎļþÃûµÄ×Ö·û´®ÎÄ×Ö
__LINE__
´ú±íµ±Ç°Ô´´úÂëÖеÄÐкŵÄÕûÊý³£Á¿
__TIME__
Ô´Îļþ±àÒëʱ¼ä£¬¸ñʽ΢“hh£ ......
¡¡¡¡ÔÚÍøÂçÁ¬½ÓģʽÖÐ,³ý¶ÔµÈÍøÍâ,»¹ÓÐÁíÒ»ÖÖÐÎʽµÄÍøÂ磬¼´¿Í»§»ú/·þÎñÆ÷Íø£¬Client/Server¡£ÔÚ¿Í»§»ú/·þÎñÆ÷ÍøÂçÖУ¬·þÎñÆ÷ÊÇÍøÂçµÄºËÐÄ£¬¶ø¿Í»§»úÊÇÍøÂçµÄ»ù´¡£¬¿Í»§»úÒÀ¿¿·þÎñÆ÷»ñµÃËùÐèÒªµÄÍøÂç×ÊÔ´£¬¶ø·þÎñÆ÷Ϊ¿Í»§»úÌá¹©ÍøÂç±ØÐëµÄ×ÊÔ´¡£
¡¡¡¡ÕâÀï¿Í»§ºÍ·þÎñÆ÷¶¼ÊÇָͨÐÅÖÐËùÉæ¼°µÄÁ½¸öÓ¦Óýø³Ì£¨Èí¼þ£©¡£Ê¹ÓüÆËã» ......