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

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

?? misc.c

?? 編譯原理(Flex):生成詞法和語法分析程序的源代碼的程序。
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* misc - miscellaneous flex routines */

/*-
 * Copyright (c) 1990 The Regents of the University of California.
 * All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * Vern Paxson.
 * 
 * The United States Government has rights in this work pursuant
 * to contract no. DE-AC03-76SF00098 between the United States
 * Department of Energy and the University of California.
 *
 * Redistribution and use in source and binary forms are permitted provided
 * that: (1) source distributions retain this entire copyright notice and
 * comment, and (2) distributions including binaries display the following
 * acknowledgement:  ``This product includes software developed by the
 * University of California, Berkeley and its contributors'' in the
 * documentation or other materials provided with the distribution and in
 * all advertising materials mentioning features or use of this software.
 * Neither the name of the University nor the names of its contributors may
 * be used to endorse or promote products derived from this software without
 * specific prior written permission.
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

/* $Header: /home/daffy/u0/vern/flex/RCS/misc.c,v 2.47 95/04/28 11:39:39 vern Exp $ */

#include "flexdef.h"


void action_define( defname, value )
char *defname;
int value;
	{
	char buf[MAXLINE];

	if ( (int) strlen( defname ) > MAXLINE / 2 )
		{
		format_pinpoint_message( _( "name \"%s\" ridiculously long" ), 
			defname );
		return;
		}

	sprintf( buf, "#define %s %d\n", defname, value );
	add_action( buf );
	}


void add_action( new_text )
char *new_text;
	{
	int len = strlen( new_text );

	while ( len + action_index >= action_size - 10 /* slop */ )
		{
		int new_size = action_size * 2;

		if ( new_size <= 0 )
			/* Increase just a little, to try to avoid overflow
			 * on 16-bit machines.
			 */
			action_size += action_size / 8;
		else
			action_size = new_size;

		action_array =
			reallocate_character_array( action_array, action_size );
		}

	strcpy( &action_array[action_index], new_text );

	action_index += len;
	}


/* allocate_array - allocate memory for an integer array of the given size */

void *allocate_array( size, element_size )
int size;
size_t element_size;
	{
	register void *mem;
	size_t num_bytes = element_size * size;

	mem = flex_alloc( num_bytes );
	if ( ! mem )
		flexfatal(
			_( "memory allocation failed in allocate_array()" ) );

	return mem;
	}


/* all_lower - true if a string is all lower-case */

int all_lower( str )
register char *str;
	{
	while ( *str )
		{
		if ( ! isascii( (Char) *str ) || ! islower( *str ) )
			return 0;
		++str;
		}

	return 1;
	}


/* all_upper - true if a string is all upper-case */

int all_upper( str )
register char *str;
	{
	while ( *str )
		{
		if ( ! isascii( (Char) *str ) || ! isupper( *str ) )
			return 0;
		++str;
		}

	return 1;
	}


/* bubble - bubble sort an integer array in increasing order
 *
 * synopsis
 *   int v[n], n;
 *   void bubble( v, n );
 *
 * description
 *   sorts the first n elements of array v and replaces them in
 *   increasing order.
 *
 * passed
 *   v - the array to be sorted
 *   n - the number of elements of 'v' to be sorted
 */

void bubble( v, n )
int v[], n;
	{
	register int i, j, k;

	for ( i = n; i > 1; --i )
		for ( j = 1; j < i; ++j )
			if ( v[j] > v[j + 1] )	/* compare */
				{
				k = v[j];	/* exchange */
				v[j] = v[j + 1];
				v[j + 1] = k;
				}
	}


/* check_char - checks a character to make sure it's within the range
 *		we're expecting.  If not, generates fatal error message
 *		and exits.
 */

void check_char( c )
int c;
	{
	if ( c >= CSIZE )
		lerrsf( _( "bad character '%s' detected in check_char()" ),
			readable_form( c ) );

	if ( c >= csize )
		lerrsf(
		_( "scanner requires -8 flag to use the character %s" ),
			readable_form( c ) );
	}



/* clower - replace upper-case letter to lower-case */

Char clower( c )
register int c;
	{
	return (Char) ((isascii( c ) && isupper( c )) ? tolower( c ) : c);
	}


/* copy_string - returns a dynamically allocated copy of a string */

char *copy_string( str )
register const char *str;
	{
	register const char *c1;
	register char *c2;
	char *copy;
	unsigned int size;

	/* find length */
	for ( c1 = str; *c1; ++c1 )
		;

	size = (c1 - str + 1) * sizeof( char );
	copy = (char *) flex_alloc( size );

	if ( copy == NULL )
		flexfatal( _( "dynamic memory failure in copy_string()" ) );

	for ( c2 = copy; (*c2++ = *str++) != 0; )
		;

	return copy;
	}


/* copy_unsigned_string -
 *    returns a dynamically allocated copy of a (potentially) unsigned string
 */

Char *copy_unsigned_string( str )
register Char *str;
	{
	register Char *c;
	Char *copy;

	/* find length */
	for ( c = str; *c; ++c )
		;

	copy = allocate_Character_array( c - str + 1 );

	for ( c = copy; (*c++ = *str++) != 0; )
		;

	return copy;
	}


/* cshell - shell sort a character array in increasing order
 *
 * synopsis
 *
 *   Char v[n];
 *   int n, special_case_0;
 *   cshell( v, n, special_case_0 );
 *
 * description
 *   Does a shell sort of the first n elements of array v.
 *   If special_case_0 is true, then any element equal to 0
 *   is instead assumed to have infinite weight.
 *
 * passed
 *   v - array to be sorted
 *   n - number of elements of v to be sorted
 */

void cshell( v, n, special_case_0 )
Char v[];
int n, special_case_0;
	{
	int gap, i, j, jg;
	Char k;

	for ( gap = n / 2; gap > 0; gap = gap / 2 )
		for ( i = gap; i < n; ++i )
			for ( j = i - gap; j >= 0; j = j - gap )
				{
				jg = j + gap;

				if ( special_case_0 )
					{
					if ( v[jg] == 0 )
						break;

					else if ( v[j] != 0 && v[j] <= v[jg] )
						break;
					}

				else if ( v[j] <= v[jg] )
					break;

				k = v[j];
				v[j] = v[jg];
				v[jg] = k;
				}
	}


/* dataend - finish up a block of data declarations */

void dataend()
	{
	if ( datapos > 0 )
		dataflush();

	/* add terminator for initialization; { for vi */
	outn( "    } ;\n" );

	dataline = 0;
	datapos = 0;
	}


/* dataflush - flush generated data statements */

void dataflush()
	{
	outc( '\n' );

	if ( ++dataline >= NUMDATALINES )
		{
		/* Put out a blank line so that the table is grouped into
		 * large blocks that enable the user to find elements easily.
		 */
		outc( '\n' );
		dataline = 0;
		}

	/* Reset the number of characters written on the current line. */
	datapos = 0;
	}


/* flexerror - report an error message and terminate */

void flexerror( msg )
const char msg[];
	{
	fprintf( stderr, "%s: %s\n", program_name, msg );
	flexend( 1 );
	}


/* flexfatal - report a fatal error message and terminate */

void flexfatal( msg )
const char msg[];
	{
	fprintf( stderr, _( "%s: fatal internal error, %s\n" ),
		program_name, msg );
	exit( 1 );
	}


/* htoi - convert a hexadecimal digit string to an integer value */

int htoi( str )
Char str[];
	{
	unsigned int result;

	(void) sscanf( (char *) str, "%x", &result );

	return result;
	}


/* lerrif - report an error message formatted with one integer argument */

void lerrif( msg, arg )
const char msg[];
int arg;
	{
	char errmsg[MAXLINE];
	(void) sprintf( errmsg, msg, arg );
	flexerror( errmsg );
	}


/* lerrsf - report an error message formatted with one string argument */

void lerrsf( msg, arg )
const char msg[], arg[];
	{
	char errmsg[MAXLINE];

	(void) sprintf( errmsg, msg, arg );
	flexerror( errmsg );
	}


/* line_directive_out - spit out a "#line" statement */

void line_directive_out( output_file, do_infile )
FILE *output_file;
int do_infile;
	{
	char directive[MAXLINE], filename[MAXLINE];
	char *s1, *s2, *s3;
	static char line_fmt[] = "#line %d \"%s\"\n";

	if ( ! gen_line_dirs )
		return;

	if ( (do_infile && ! infilename) || (! do_infile && ! outfilename) )
		/* don't know the filename to use, skip */
		return;

	s1 = do_infile ? infilename : outfilename;
	s2 = filename;
	s3 = &filename[sizeof( filename ) - 2];

	while ( s2 < s3 && *s1 )
		{
		if ( *s1 == '\\' )
			/* Escape the '\' */
			*s2++ = '\\';

		*s2++ = *s1++;
		}

	*s2 = '\0';

	if ( do_infile )
		sprintf( directive, line_fmt, linenum, filename );
	else
		{
		if ( output_file == stdout )
			/* Account for the line directive itself. */
			++out_linenum;

		sprintf( directive, line_fmt, out_linenum, filename );
		}

	/* If output_file is nil then we should put the directive in
	 * the accumulated actions.
	 */
	if ( output_file )
		{
		fputs( directive, output_file );
		}
	else
		add_action( directive );
	}


/* mark_defs1 - mark the current position in the action array as
 *               representing where the user's section 1 definitions end
 *		 and the prolog begins
 */
void mark_defs1()
	{
	defs1_offset = 0;
	action_array[action_index++] = '\0';

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区视频在线播放| 国产麻豆精品95视频| 亚洲精品一线二线三线无人区| 国产成人综合在线| 五月激情综合婷婷| 欧美高清在线视频| 日韩精品一区二区三区老鸭窝| av在线播放一区二区三区| 久久精品国产久精国产| 亚洲国产综合91精品麻豆| 国产欧美精品在线观看| 日韩一区二区在线免费观看| 色婷婷久久久久swag精品| 国产伦精品一区二区三区视频青涩| 亚洲夂夂婷婷色拍ww47| 国产精品三级av在线播放| 精品国产乱码91久久久久久网站| 欧美丝袜自拍制服另类| 成人av一区二区三区| 国产一区二区调教| 国产麻豆精品视频| 久久成人av少妇免费| 日本伊人色综合网| 天天影视涩香欲综合网| 亚洲资源中文字幕| 亚洲一区二区三区在线播放| 国产精品久久久久久妇女6080 | 欧美午夜精品久久久| 成人的网站免费观看| 成人精品一区二区三区四区| 国产精品自产自拍| 韩国一区二区三区| 国产一区二区三区久久久| 精品在线观看免费| 久久精品国内一区二区三区| 青青草国产成人av片免费| 日韩二区三区四区| 日本中文字幕一区二区视频 | 亚洲高清视频的网址| 亚洲精品欧美激情| 亚洲精品成人悠悠色影视| 亚洲欧美偷拍另类a∨色屁股| 国产精品电影一区二区三区| 综合在线观看色| 一区二区中文视频| 亚洲另类在线制服丝袜| 亚洲免费观看高清在线观看| 亚洲乱码国产乱码精品精的特点| 一区二区三区在线高清| 亚洲一区影音先锋| 日韩国产一区二| 日本系列欧美系列| 久草这里只有精品视频| 激情深爱一区二区| 成人午夜私人影院| 色94色欧美sute亚洲线路一ni| 在线免费一区三区| 91精品在线观看入口| 精品少妇一区二区三区视频免付费| 久久一区二区视频| 中文字幕在线播放不卡一区| 亚洲精品福利视频网站| 日av在线不卡| 成人精品免费视频| 欧美性做爰猛烈叫床潮| 欧美一区二区黄色| 国产亚洲一本大道中文在线| 亚洲桃色在线一区| 日韩精品国产欧美| 粉嫩绯色av一区二区在线观看| 9i在线看片成人免费| 欧美福利视频一区| 久久久久久影视| 亚洲精品成人少妇| 精品无人码麻豆乱码1区2区 | 欧美日韩免费电影| 欧美精品一区二区三区高清aⅴ | 亚洲国产成人av网| 国产一区亚洲一区| 在线视频你懂得一区二区三区| 6080午夜不卡| 国产亚洲欧美中文| 亚洲午夜在线电影| 国产麻豆成人精品| 欧美视频一二三区| 国产午夜久久久久| 香蕉影视欧美成人| 成人美女在线视频| 日韩欧美一区中文| 亚洲精品国产a久久久久久| 韩国毛片一区二区三区| 在线观看91视频| 久久九九久久九九| 日本中文字幕一区二区视频| 91美女精品福利| 久久噜噜亚洲综合| 婷婷一区二区三区| 99久久99久久精品免费看蜜桃| 欧美一区二区私人影院日本| 亚洲色图一区二区三区| 国内精品视频666| 欧美日韩精品久久久| 国产精品白丝在线| 国产乱妇无码大片在线观看| 欧美精品1区2区3区| 日韩美女啊v在线免费观看| 极品美女销魂一区二区三区 | 亚洲综合视频在线| 国产成人a级片| 日韩久久久久久| 亚洲高清一区二区三区| 91在线视频网址| 欧美韩日一区二区三区四区| 久久精品国产第一区二区三区| 欧洲一区在线观看| 日韩理论在线观看| 成人av免费在线| 欧美国产在线观看| 国产主播一区二区三区| 91精品国产欧美一区二区| 伊人色综合久久天天| 成人国产一区二区三区精品| 精品久久国产老人久久综合| 秋霞午夜鲁丝一区二区老狼| 欧美日韩在线播放三区四区| 亚洲免费观看高清| voyeur盗摄精品| 成人欧美一区二区三区1314| 成人夜色视频网站在线观看| 久久综合久色欧美综合狠狠| 狠狠色丁香久久婷婷综合丁香| 欧美一区日韩一区| 日韩精品乱码av一区二区| 7777精品伊人久久久大香线蕉经典版下载 | 亚洲综合区在线| 欧美系列一区二区| 婷婷国产v国产偷v亚洲高清| 欧美日韩国产影片| 三级欧美韩日大片在线看| 欧美精品三级在线观看| 日日噜噜夜夜狠狠视频欧美人 | 69精品人人人人| 日本大胆欧美人术艺术动态| 91精品国产丝袜白色高跟鞋| 日韩不卡免费视频| 欧美岛国在线观看| 国产盗摄女厕一区二区三区| 国产精品欧美久久久久一区二区| 不卡的av在线| 亚洲女子a中天字幕| 91黄视频在线观看| 偷拍日韩校园综合在线| 日韩欧美一级特黄在线播放| 久久91精品国产91久久小草| 国产欧美日韩激情| 色婷婷av一区二区三区之一色屋| 亚洲小少妇裸体bbw| 在线成人av网站| 韩国精品主播一区二区在线观看| 国产女同互慰高潮91漫画| 91视频com| 日本欧美一区二区三区| 精品国免费一区二区三区| 成人免费视频视频在线观看免费 | 亚洲国产成人av好男人在线观看| 51精品秘密在线观看| 精品在线观看免费| 自拍偷拍亚洲激情| 欧美一区二区视频网站| 国产精品88av| 一区二区三区丝袜| 日韩亚洲欧美在线| 不卡一区二区在线| 无码av免费一区二区三区试看 | 日本一区二区三区dvd视频在线| av在线播放成人| 天天色综合天天| 国产农村妇女精品| 欧美性极品少妇| 国产精品一区二区视频| 一区二区三区在线视频播放| 日韩欧美一区在线观看| 99久久国产综合精品女不卡| 日本不卡一区二区| 国产精品美女久久久久久久久久久| 欧美这里有精品| 精品一区二区三区免费播放| 日韩理论片网站| 久久久国产一区二区三区四区小说 | 亚洲靠逼com| 精品国产一区久久| 色久综合一二码| 国产精品一区二区你懂的| 亚洲成人午夜影院| 欧美激情在线一区二区| 91精品欧美综合在线观看最新| 成人91在线观看| 国产精品影视天天线| 亚洲成人av电影| 中文字幕中文字幕一区|