亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? printf.c

?? Free Usb Stack for NXP LPC2xxx microcontrollers.
?? C
字號:
/*	Copyright 2001, 2002 Georges Menie (www.menie.org)	stdarg version contributed by Christian Ettinger    This program is free software; you can redistribute it and/or modify    it under the terms of the GNU Lesser General Public License as published by    the Free Software Foundation; either version 2 of the License, or    (at your option) any later version.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU Lesser General Public License for more details.    You should have received a copy of the GNU Lesser General Public License    along with this program; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*//*	putchar is the only external dependency for this file,	if you have a working putchar, leave it commented out.	If not, uncomment the define below and	replace outbyte(c) by your own function call.#define putchar(c) outbyte(c)*/#include <stdarg.h>#include "console.h"static void printchar(char **str, int c){	if (str) {		**str = c;		++(*str);	}	else {		putchar(c);	}}#define PAD_RIGHT 1#define PAD_ZERO 2static int prints(char **out, const char *string, int width, int pad){	register int pc = 0, padchar = ' ';	if (width > 0) {		register int len = 0;		register const char *ptr;		for (ptr = string; *ptr; ++ptr) ++len;		if (len >= width) width = 0;		else width -= len;		if (pad & PAD_ZERO) padchar = '0';	}	if (!(pad & PAD_RIGHT)) {		for ( ; width > 0; --width) {			printchar (out, padchar);			++pc;		}	}	for ( ; *string ; ++string) {		printchar (out, *string);		++pc;	}	for ( ; width > 0; --width) {		printchar (out, padchar);		++pc;	}	return pc;}/* the following should be enough for 32 bit int */#define PRINT_BUF_LEN 12static int printi(char **out, int i, int b, int sg, int width, int pad, int letbase){	char print_buf[PRINT_BUF_LEN];	register char *s;	register int t, neg = 0, pc = 0;	register unsigned int u = i;	if (i == 0) {		print_buf[0] = '0';		print_buf[1] = '\0';		return prints (out, print_buf, width, pad);	}	if (sg && b == 10 && i < 0) {		neg = 1;		u = -i;	}	s = print_buf + PRINT_BUF_LEN-1;	*s = '\0';	while (u) {		t = u % b;		if( t >= 10 )			t += letbase - '0' - 10;		*--s = t + '0';		u /= b;	}	if (neg) {		if( width && (pad & PAD_ZERO) ) {			printchar (out, '-');			++pc;			--width;		}		else {			*--s = '-';		}	}	return pc + prints (out, s, width, pad);}static int print(char **out, const char *format, va_list args ){	register int width, pad;	register int pc = 0;	char scr[2];	for (; *format != 0; ++format) {		if (*format == '%') {			++format;			width = pad = 0;			if (*format == '\0') break;			if (*format == '%') goto out;			if (*format == '-') {				++format;				pad = PAD_RIGHT;			}			while (*format == '0') {				++format;				pad |= PAD_ZERO;			}			for ( ; *format >= '0' && *format <= '9'; ++format) {				width *= 10;				width += *format - '0';			}			if( *format == 's' ) {				register char *s = (char *)va_arg( args, int );				pc += prints (out, s?s:"(null)", width, pad);				continue;			}			if( *format == 'd' ) {				pc += printi (out, va_arg( args, int ), 10, 1, width, pad, 'a');				continue;			}			if( *format == 'x' ) {				pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'a');				continue;			}			if( *format == 'X' ) {				pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'A');				continue;			}			if( *format == 'u' ) {				pc += printi (out, va_arg( args, int ), 10, 0, width, pad, 'a');				continue;			}			if( *format == 'c' ) {				/* char are converted to int then pushed on the stack */				scr[0] = (char)va_arg( args, int );				scr[1] = '\0';				pc += prints (out, scr, width, pad);				continue;			}		}		else {		out:			printchar (out, *format);			++pc;		}	}	if (out) **out = '\0';	va_end( args );	return pc;}int printf(const char *format, ...){        va_list args;                va_start( args, format );        return print( 0, format, args );}int sprintf(char *out, const char *format, ...){        va_list args;                va_start( args, format );        return print( &out, format, args );}#ifdef TEST_PRINTFint main(void){	char *ptr = "Hello world!";	char *np = 0;	int i = 5;	unsigned int bs = sizeof(int)*8;	int mi;	char buf[80];	mi = (1 << (bs-1)) + 1;	printf("%s\n", ptr);	printf("printf test\n");	printf("%s is null pointer\n", np);	printf("%d = 5\n", i);	printf("%d = - max int\n", mi);	printf("char %c = 'a'\n", 'a');	printf("hex %x = ff\n", 0xff);	printf("hex %02x = 00\n", 0);	printf("signed %d = unsigned %u = hex %x\n", -3, -3, -3);	printf("%d %s(s)%", 0, "message");	printf("\n");	printf("%d %s(s) with %%\n", 0, "message");	sprintf(buf, "justif: \"%-10s\"\n", "left"); printf("%s", buf);	sprintf(buf, "justif: \"%10s\"\n", "right"); printf("%s", buf);	sprintf(buf, " 3: %04d zero padded\n", 3); printf("%s", buf);	sprintf(buf, " 3: %-4d left justif.\n", 3); printf("%s", buf);	sprintf(buf, " 3: %4d right justif.\n", 3); printf("%s", buf);	sprintf(buf, "-3: %04d zero padded\n", -3); printf("%s", buf);	sprintf(buf, "-3: %-4d left justif.\n", -3); printf("%s", buf);	sprintf(buf, "-3: %4d right justif.\n", -3); printf("%s", buf);	return 0;}/* * if you compile this file with *   gcc -Wall $(YOUR_C_OPTIONS) -DTEST_PRINTF -c printf.c * you will get a normal warning: *   printf.c:214: warning: spurious trailing `%' in format * this line is testing an invalid % at the end of the format string. * * this should display (on 32bit int machine) : * * Hello world! * printf test * (null) is null pointer * 5 = 5 * -2147483647 = - max int * char a = 'a' * hex ff = ff * hex 00 = 00 * signed -3 = unsigned 4294967293 = hex fffffffd * 0 message(s) * 0 message(s) with % * justif: "left      " * justif: "     right" *  3: 0003 zero padded *  3: 3    left justif. *  3:    3 right justif. * -3: -003 zero padded * -3: -3   left justif. * -3:   -3 right justif. */#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区视频导航| 亚洲精品va在线观看| 久久精品国产精品青草| 精品三级在线看| 精品夜夜嗨av一区二区三区| 日韩精品一区二区在线| 国产福利91精品一区二区三区| 精品国产不卡一区二区三区| 国产福利91精品一区二区三区| 中文字幕欧美国产| 色视频成人在线观看免| 天天色天天操综合| 亚洲精品一区二区三区影院| 成人国产精品免费网站| 夜色激情一区二区| 欧美久久久影院| 国产麻豆精品一区二区| 中文字幕一区二区三区在线不卡| 在线一区二区视频| 久久超级碰视频| 亚洲婷婷在线视频| 在线播放欧美女士性生活| 国产一区欧美二区| 一区二区三区在线观看视频| 制服丝袜国产精品| 成人激情文学综合网| 亚洲国产日韩一区二区| 久久在线观看免费| 色综合久久综合| 久久99热狠狠色一区二区| 国产精品久久久久四虎| 欧美一区二区三区免费视频| 成人黄色软件下载| 免费人成网站在线观看欧美高清| 国产精品欧美久久久久无广告| 欧美日韩在线播放三区| 国产在线观看免费一区| 亚洲国产一区二区在线播放| 国产女人18毛片水真多成人如厕 | 99国产精品久| 日韩国产一二三区| 亚洲视频一二三区| 欧美精品一区二| 欧美久久久久久蜜桃| 91免费小视频| 懂色av一区二区三区免费看| 日本成人在线视频网站| 一区二区三区四区精品在线视频 | 日韩午夜激情av| 色88888久久久久久影院野外 | 美国毛片一区二区| 亚洲精品一二三| 欧美激情资源网| 精品第一国产综合精品aⅴ| 欧美日韩精品二区第二页| 丁香婷婷综合色啪| 久久99最新地址| 美女爽到高潮91| 五月天婷婷综合| 亚洲欧洲综合另类| 日韩美女视频一区二区| 国产婷婷色一区二区三区在线| 精品乱码亚洲一区二区不卡| 欧美精品自拍偷拍动漫精品| 91久久国产综合久久| 成人蜜臀av电影| 国产精品一卡二| 国产综合一区二区| 精品亚洲成av人在线观看| 免费看日韩精品| 久久99精品一区二区三区| 日韩精品电影在线| 日韩和欧美一区二区| 亚洲超碰97人人做人人爱| 亚洲国产精品久久久久秋霞影院| 亚洲男人都懂的| 亚洲国产精品久久不卡毛片| 亚洲最色的网站| 亚洲成人综合网站| 天天色综合成人网| 麻豆成人综合网| 国产在线播精品第三| 国产一区二区调教| 国产精品系列在线播放| 国产91精品免费| 成人精品国产免费网站| 99精品欧美一区二区三区小说| 91视频在线观看免费| 91久久精品一区二区三| 在线91免费看| 精品av综合导航| 国产精品免费视频一区| 亚洲欧美日韩国产综合在线| 午夜视频一区在线观看| 男男gaygay亚洲| 国产凹凸在线观看一区二区| 99视频在线精品| 在线观看亚洲a| 欧美一二区视频| 日本一区二区在线不卡| 亚洲免费观看高清完整| 亚洲18女电影在线观看| 久久国产精品区| 91香蕉视频mp4| 在线播放91灌醉迷j高跟美女| 精品国产伦一区二区三区观看方式 | 久久免费的精品国产v∧| 久久久精品tv| 亚洲综合色自拍一区| 日韩电影一区二区三区| 国产九色sp调教91| 色狠狠色狠狠综合| 日韩三区在线观看| 国产欧美久久久精品影院| 亚洲一区中文在线| 久久99日本精品| 91国模大尺度私拍在线视频| 欧美大片顶级少妇| 亚洲女同一区二区| 久久99精品久久久久婷婷| 91在线观看美女| 欧美一级欧美三级在线观看| 国产精品美日韩| 久久99精品久久久久久| 色94色欧美sute亚洲线路一ni| 精品日韩欧美一区二区| 一区二区三区免费网站| 国产在线国偷精品产拍免费yy| 在线一区二区观看| 国产片一区二区三区| 视频在线在亚洲| 一本到高清视频免费精品| 久久婷婷国产综合国色天香| 一区二区不卡在线播放| 懂色av中文一区二区三区| 91精品国产高清一区二区三区蜜臀| 欧美国产精品中文字幕| 蜜桃av一区二区三区电影| 在线观看国产91| 国产欧美精品一区二区色综合 | 中文字幕一区二区在线观看 | 成人avav影音| 欧美刺激脚交jootjob| 午夜精品视频在线观看| 91在线精品一区二区| 久久久久一区二区三区四区| 亚洲h精品动漫在线观看| 一本大道久久a久久精二百| 久久精品一区八戒影视| 久久av老司机精品网站导航| 欧美精品一级二级| 亚洲综合激情网| 91黄色在线观看| 亚洲日本一区二区三区| 成人黄色777网| 国产精品三级av| 国产99久久久久久免费看农村| 欧美一区二区三区视频免费播放 | 国产在线精品一区二区夜色| 欧美日本乱大交xxxxx| 一区二区三区日韩精品视频| 91激情五月电影| 一区二区三区日本| 色就色 综合激情| 一区二区三区波多野结衣在线观看| 一本到三区不卡视频| 亚洲精品高清视频在线观看| 91亚洲男人天堂| 亚洲裸体在线观看| 91免费在线看| 亚洲成av人影院在线观看网| 欧美二区三区的天堂| 午夜久久福利影院| 91精品久久久久久久99蜜桃| 免费看日韩精品| 欧美va亚洲va香蕉在线| 狠狠色伊人亚洲综合成人| 久久精品亚洲一区二区三区浴池| 国产精品主播直播| 国产精品乱人伦中文| 91在线免费看| 亚洲一区二区视频在线观看| 欧美日韩国产一区| 奇米精品一区二区三区在线观看 | 中文字幕一区二区三区在线播放| 成人免费电影视频| 亚洲日本成人在线观看| 在线观看av一区二区| 午夜精品爽啪视频| 日韩精品中文字幕一区| 国产成人在线看| 亚洲免费视频成人| 777午夜精品视频在线播放| 精品一二线国产| 亚洲色图色小说| 欧美精品vⅰdeose4hd| 久久激情五月激情| 亚洲视频在线观看三级| 欧美日韩成人综合在线一区二区| 精品一区二区三区av|