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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? symbol.c

?? Calc Software Package for Number Calc
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * symbol - global and local symbol routines * * Copyright (C) 1999-2006  David I. Bell and Ernest Bowen * * Primary author:  David I. Bell * * Calc is open software; you can redistribute it and/or modify it under * the terms of the version 2.1 of the GNU Lesser General Public License * as published by the Free Software Foundation. * * Calc 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. * * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL.  You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. * 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA. * * @(#) $Revision: 29.6 $ * @(#) $Id: symbol.c,v 29.6 2006/06/20 10:28:06 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/symbol.c,v $ * * Under source code control:	1990/02/15 01:48:23 * File existed as early as:	before 1990 * * Share and enjoy!  :-)	http://www.isthe.com/chongo/tech/comp/calc/ */#include <stdio.h>#include "calc.h"#include "token.h"#include "symbol.h"#include "string.h"#include "opcodes.h"#include "func.h"#define HASHSIZE	37	/* size of hash table */extern FILE *f_open(char *name, char *mode);static int filescope;		/* file scope level for static variables */static int funcscope;		/* function scope level for static variables */static STRINGHEAD localnames;	/* list of local variable names */static STRINGHEAD globalnames;	/* list of global variable names */static STRINGHEAD paramnames;	/* list of parameter variable names */static GLOBAL *globalhash[HASHSIZE];	/* hash table for globals */static void printtype(VALUE *);static void unscope(void);static void addstatic(GLOBAL *);static long staticcount = 0;static long staticavail = 0;static GLOBAL **statictable;/* * Hash a symbol name so we can find it in the hash table. * Args are the symbol name and the symbol name size. */#define HASHSYM(n, s) ((unsigned)((n)[0]*123 + (n)[s-1]*135 + (s)*157) % HASHSIZE)/* * Initialize the global symbol table. */voidinitglobals(void){	int i;		/* index counter */	for (i = 0; i < HASHSIZE; i++)		globalhash[i] = NULL;	initstr(&globalnames);	filescope = SCOPE_STATIC;	funcscope = 0;}/* * Define a possibly new global variable which may or may not be static. * If it did not already exist, it is created with a value of zero. * The address of the global symbol structure is returned. * * given: *	name		name of global variable *	isstatic	TRUE if symbol is static */GLOBAL *addglobal(char *name, BOOL isstatic){	GLOBAL *sp;		/* current symbol pointer */	GLOBAL **hp;		/* hash table head address */	size_t len;		/* length of string */	int newfilescope;	/* file scope being looked for */	int newfuncscope;	/* function scope being looked for */	newfilescope = SCOPE_GLOBAL;	newfuncscope = 0;	if (isstatic) {		newfilescope = filescope;		newfuncscope = funcscope;	}	len = strlen(name);	if (len <= 0)		return NULL;	hp = &globalhash[HASHSYM(name, len)];	for (sp = *hp; sp; sp = sp->g_next) {		if ((sp->g_len == len) && (strcmp(sp->g_name, name) == 0)			&& (sp->g_filescope == newfilescope)			&& (sp->g_funcscope == newfuncscope))				return sp;	}	sp = (GLOBAL *) malloc(sizeof(GLOBAL));	if (sp == NULL)		return sp;	sp->g_name = addstr(&globalnames, name);	sp->g_len = len;	sp->g_filescope = newfilescope;	sp->g_funcscope = newfuncscope;	sp->g_value.v_num = qlink(&_qzero_);	sp->g_value.v_type = V_NUM;	sp->g_value.v_subtype = V_NOSUBTYPE;	sp->g_next = *hp;	*hp = sp;	return sp;}/* * Look for the highest-scope global variable with a specified name. * Returns the address of the variable or NULL according as the search * succeeds or fails. */GLOBAL *findglobal(char *name){	GLOBAL *sp;		/* current symbol pointer */	GLOBAL *bestsp;		/* found symbol with highest scope */	size_t len;		/* length of string */	bestsp = NULL;	len = strlen(name);	for (sp = globalhash[HASHSYM(name, len)]; sp; sp = sp->g_next) {		if ((sp->g_len == len) && !strcmp(sp->g_name, name)) {			if ((bestsp == NULL) ||				(sp->g_filescope > bestsp->g_filescope) ||				 (sp->g_funcscope > bestsp->g_funcscope))				bestsp = sp;		}	}	return bestsp;}/* * Return the name of a global variable given its address. * * given: *	sp		address of global pointer */char *globalname(GLOBAL *sp){	if (sp)		return sp->g_name;	return "";}/* * Show the value of all real-number valued global variables, displaying * only the head and tail of very large numerators and denominators. * Static variables are not included. */voidshowglobals(void){	GLOBAL **hp;			/* hash table head address */	register GLOBAL *sp;		/* current global symbol pointer */	long count;			/* number of global variables shown */	count = 0;	for (hp = &globalhash[HASHSIZE-1]; hp >= globalhash; hp--) {		for (sp = *hp; sp; sp = sp->g_next) {			if (sp->g_value.v_type != V_NUM)				continue;			if (count++ == 0) {				printf("\nName	  Digits	   Value\n");				printf(	 "----	  ------	   -----\n");			}			printf("%-8s", sp->g_name);			if (sp->g_filescope != SCOPE_GLOBAL)				printf(" (s)");			fitprint(sp->g_value.v_num, 50);			printf("\n");		}	}	if (count == 0) {		printf("No real-valued global variables\n");	}	putchar('\n');}voidshowallglobals(void){	GLOBAL **hp;			/* hash table head address */	register GLOBAL *sp;		/* current global symbol pointer */	long count;			/* number of global variables shown */	count = 0;	for (hp = &globalhash[HASHSIZE-1]; hp >= globalhash; hp--) {		for (sp = *hp; sp; sp = sp->g_next) {			if (count++ == 0) {				printf("\nName	  Level	   Type\n");				printf(	 "----	  -----	   -----\n");			}			printf("%-8s%4d	    ", sp->g_name, sp->g_filescope);			printtype(&sp->g_value);			printf("\n");		}	}	if (count > 0)		printf("\nNumber: %ld\n", count);	else		printf("No global variables\n");}static voidprinttype(VALUE *vp){	int	type;	char	*s;	type = vp->v_type;	if (type < 0) {		printf("Error %d", -type);		return;	}	switch (type) {	case V_NUM:		printf("real = ");		fitprint(vp->v_num, 32);		return;	case V_COM:		printf("complex = ");		fitprint(vp->v_com->real, 8);		if (!vp->v_com->imag->num.sign)			printf("+");		fitprint(vp->v_com->imag, 8);		printf("i");		return;	case V_STR:		printf("string = \"");		fitstring(vp->v_str->s_str, vp->v_str->s_len, 50);		printf("\"");		return;	case V_NULL:		s = "null";		break;	case V_MAT:		s = "matrix";		break;	case V_LIST:		s = "list";		break;	case V_ASSOC:		s = "association";		break;	case V_OBJ:		printf("%s ", objtypename(			vp->v_obj->o_actions->oa_index));		s = "object";		break;	case V_FILE:		s = "file id";		break;	case V_RAND:		s = "additive 55 random state";		break;	case V_RANDOM:		s = "Blum random state";		break;	case V_CONFIG:		s = "config state";		break;	case V_HASH:		s = "hash state";		break;	case V_BLOCK:		s = "unnamed block";		break;	case V_NBLOCK:		s = "named block";		break;	case V_VPTR:		s = "value pointer";		break;	case V_OPTR:		s = "octet pointer";		break;	case V_SPTR:		s = "string pointer";		break;	case V_NPTR:		s = "number pointer";		break;	default:		s = "???";		break;	}	printf("%s", s);}/* * Write all normal global variables to an output file. * Note: Currently only simple types are saved. * Returns nonzero on error. */intwriteglobals(char *name){	FILE *fp;	GLOBAL **hp;			/* hash table head address */	register GLOBAL *sp;		/* current global symbol pointer */	int savemode;			/* saved output mode */	extern void math_setfp(FILE *fp);	fp = f_open(name, "w");	if (fp == NULL)		return 1;	math_setfp(fp);	for (hp = &globalhash[HASHSIZE-1]; hp >= globalhash; hp--) {		for (sp = *hp; sp; sp = sp->g_next) {			switch (sp->g_value.v_type) {			case V_NUM:			case V_COM:			case V_STR:				break;			default:				continue;			}			math_fmt("%s = ", sp->g_name);			savemode = math_setmode(MODE_HEX);			printvalue(&sp->g_value, PRINT_UNAMBIG);			math_setmode(savemode);			math_str(";\n");		}	}	math_setfp(stdout);	if (fclose(fp))		return 1;	return 0;}/* * Free all non-null global and visible static variables */voidfreeglobals(void){	GLOBAL **hp;		/* hash table head address */	GLOBAL *sp;		/* current global symbol pointer */	long count;		/* number of global variables freed */	/*	 * We prevent the hp pointer from walking behind globalhash	 * by stopping one short of the end and running the loop one	 * more time.	 *	 * We could stop the loop with just hp >= globalhash, but stopping	 * short and running the loop one last time manually helps make	 * code checkers such as insure happy.	 */	count = 0;	for (hp = &globalhash[HASHSIZE-1]; hp > globalhash; hp--) {		for (sp = *hp; sp; sp = sp->g_next) {			if (sp->g_value.v_type != V_NULL) {				freevalue(&sp->g_value);				count++;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品99久| 欧美丰满一区二区免费视频| 在线精品视频一区二区三四| 欧美精品在线观看一区二区| 欧美国产精品v| 男女性色大片免费观看一区二区 | 欧美日韩国产精选| 国产日韩欧美激情| 日本大胆欧美人术艺术动态 | 欧美激情中文不卡| 欧美a一区二区| 欧美色综合网站| 国产精品久久久久久久久晋中| 欧美bbbbb| 欧美女孩性生活视频| 亚洲免费大片在线观看| 国产精品1区二区.| 精品国产污网站| 三级在线观看一区二区 | 国产一二精品视频| 欧美一区二区大片| 天堂av在线一区| 欧美性生活久久| 亚洲蜜臀av乱码久久精品蜜桃| 国产夫妻精品视频| 欧美精品一区二区三区蜜桃 | 欧美日韩日日骚| 亚洲人成小说网站色在线| 国产成人综合在线播放| 久久你懂得1024| 国产一区在线不卡| 精品福利一区二区三区免费视频| 日本不卡123| 欧美一区二区视频观看视频| 五月天丁香久久| 欧美美女网站色| 日本欧美在线观看| 国产亚洲一区二区在线观看| 亚洲午夜一二三区视频| 欧美日韩视频在线观看一区二区三区 | 亚洲国产精品成人综合色在线婷婷| 久久精品国产一区二区三| 日韩精品一区二区三区在线播放 | 亚洲女人的天堂| 色呦呦国产精品| 一区二区成人在线| 欧美精品丝袜中出| 免费观看日韩电影| 精品国产乱码久久久久久免费| 久久精品99国产国产精| 亚洲精品一线二线三线无人区| 国产综合色在线视频区| 欧美国产欧美综合| 在线一区二区三区| 爽爽淫人综合网网站| 欧美电影免费观看高清完整版在| 国产九色sp调教91| 中文字幕字幕中文在线中不卡视频| 91蜜桃免费观看视频| 亚洲综合av网| 26uuu精品一区二区在线观看| 国产裸体歌舞团一区二区| 中文字幕一区二区三区四区不卡| 色噜噜狠狠成人网p站| 日韩精品欧美精品| 欧美激情综合在线| 欧美裸体bbwbbwbbw| 国产一级精品在线| 亚洲综合精品久久| 久久精品男人天堂av| 色菇凉天天综合网| 精品亚洲成a人| 亚洲精品视频一区| 日韩欧美中文字幕制服| 国产91在线观看丝袜| 午夜视频一区在线观看| 亚洲国产精品成人久久综合一区| 欧美亚州韩日在线看免费版国语版| 精品在线你懂的| 樱桃国产成人精品视频| 久久综合色之久久综合| 欧美写真视频网站| 成人晚上爱看视频| 另类小说一区二区三区| 夜夜夜精品看看| 久久一二三国产| 欧美精品乱码久久久久久| 成人在线一区二区三区| 蜜臀精品久久久久久蜜臀| 亚洲少妇中出一区| 国产肉丝袜一区二区| 欧美高清视频在线高清观看mv色露露十八| 国产999精品久久久久久绿帽| 午夜欧美电影在线观看| 亚洲免费观看在线视频| 国产欧美一区二区三区网站 | 欧美亚日韩国产aⅴ精品中极品| 国产毛片一区二区| 蜜桃av一区二区三区| 亚洲高清视频中文字幕| 国产精品久久福利| 欧美国产亚洲另类动漫| 精品国产乱码久久久久久免费 | 91福利国产成人精品照片| 春色校园综合激情亚洲| 激情综合色综合久久综合| 天天操天天色综合| 亚洲国产综合在线| 夜夜亚洲天天久久| 一区二区国产视频| 一区二区三区不卡在线观看| 国产精品福利电影一区二区三区四区| 久久精品在线免费观看| 久久青草欧美一区二区三区| 精品国产免费人成电影在线观看四季| 欧美一区二区视频观看视频| 91精品国产免费| 日韩一区二区免费电影| 777精品伊人久久久久大香线蕉| 欧美三级乱人伦电影| 欧美日韩一区二区在线观看| 在线观看www91| 欧美日韩国产首页| 91精品国产91久久综合桃花| 欧美一区二区三区啪啪| 日韩一区二区免费高清| 久久综合色鬼综合色| 久久久久久久综合日本| 国产精品人人做人人爽人人添| 欧美高清在线一区| 亚洲欧美另类在线| 日日骚欧美日韩| 久久精品国产精品青草| 国产精品白丝jk白祙喷水网站| 大美女一区二区三区| 91视频91自| 欧美一区二区三区在线视频| 欧美精品一区二| 国产精品国产自产拍在线| 亚洲影视在线观看| 久久精品久久99精品久久| 国产精品一区三区| 一本久久a久久精品亚洲| 欧美日韩电影在线| 久久亚洲欧美国产精品乐播| 成人免费在线观看入口| 午夜成人免费电影| 国产成人免费高清| 一本色道久久综合狠狠躁的推荐| 欧美日韩二区三区| 亚洲三级在线观看| 亚洲第一福利视频在线| 麻豆精品一区二区三区| www.欧美亚洲| 欧美一区二区三区在线观看| 国产精品久久久久久久久快鸭| 午夜精品久久久久久久蜜桃app| 国产精品一区二区久久精品爱涩 | 一区二区三区四区五区视频在线观看| 性做久久久久久免费观看| 国产精品一区二区久久精品爱涩| 在线精品视频免费播放| 亚洲精品一区二区精华| 亚洲午夜国产一区99re久久| 国产一区二区网址| 欧美日韩亚洲综合一区二区三区| 国产亚洲精品久| 日韩在线一二三区| 色综合天天天天做夜夜夜夜做| 欧美va日韩va| 午夜精品一区二区三区免费视频| 成人黄色软件下载| 26uuu国产电影一区二区| 亚洲成a人片在线观看中文| 成人黄页毛片网站| 久久久不卡网国产精品一区| 香港成人在线视频| 色婷婷激情一区二区三区| 久久精品欧美一区二区三区麻豆| 日本va欧美va精品| 欧美日韩亚洲丝袜制服| 亚洲免费观看高清| 成人免费视频视频| 国产欧美综合在线| 久久精品国产99国产| 91精品国产综合久久久蜜臀粉嫩| 亚洲精品乱码久久久久久| 成人免费毛片片v| 国产午夜精品在线观看| 狠狠色丁香久久婷婷综合_中| 91 com成人网| 午夜免费久久看| 欧美日本在线一区| 亚洲电影激情视频网站| 色婷婷香蕉在线一区二区| 综合在线观看色| 一本大道久久精品懂色aⅴ | 精品国产麻豆免费人成网站| 美女视频黄频大全不卡视频在线播放| 欧美精选一区二区|