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

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

?? exception.h

?? 國外經(jīng)典教材《程序設(shè)計抽象思想—C語言描述》一書中的關(guān)鍵性庫文件
?? H
字號:
/* * File: exception.h * Last modified on Sun Jul 24 10:26:20 1994 by eroberts * ----------------------------------------------------- * The exception package provides a general exception * handling mechanism for use with C that is portable * across a variety of compilers and operating systems. */#ifndef _exception_h#define _exception_h/* * Overview: * -------- * The exception package makes it possible for clients to * specify a handler for an exceptional conditions in a * syntactically readable way.  As a client, your first step * is to declare an exception condition name by declaring * a variable of type exception, as in * *       exception MyException; * * Normal visibility rules apply, so that you should declare * the exception variable at the appropriate level.  For * example, if an exception is local to an implementation, * it should be declared statically within that module.  If * an exception condition is shared by many modules, the * exception variable should be declared in an interface * and exported to all clients that need it.  This package * defines and exports the exception ErrorException, which * is likely to be sufficient for many clients. * * The basic functionality of exceptions is that one piece * of code can "raise" an exception so that it can then be * "handled" by special code in a dynamically enclosing * section of the program.  Exceptions are raised by calling * the pseudo-function raise with the exception name, as in * *     raise(MyException); * * Exceptions are handled using the "try" statement * (actually implemented using macros), which has the form: * *     try { *        . . . statements in the body of the block . . . *     except(exception1) *        . . . statements to handle exception 1 . . . *     except(exception2) *        . . . statements to handle exception 2 . . . *     except(ANY) *        . . . statements to handle any exception . . . *     } endtry * * Any number of except clauses may appear (up to a * maximum defined by the constant MaxExceptionsPerScope), * and the ANY clause is optional. * * When the program encounters the "try" statement, the * statements in the body are executed.  If no exception * conditions are raised during that execution, either * in this block or by a function call nested inside * this block, control passes to the end of the "try" * statement when the last statement in the block is * executed.  If an exception is raised during the * dynamic execution of the block, control immediately * passes to the statements in the appropriate except * clause.  Only the statements in that clause are * executed; no break statement is required to exit * the block.  If no handler for the raised exception * appears anywhere in the control history, the program * exits with an error. * * Examples of use: * * 1.  Catching errors. * * The following code fragment traps calls to Error, so * that the program does not quit but instead returns * to the top-level read-and-execute loop. * *     while (TRUE) { *         try { *             printf("> "); *             cmd = ReadCommand(); *             ExecuteCommand(cmd); *         except(ErrorException) *             -- additional handling code, if any -- *         } endtry *     } * * If either ReadCommand or ExecuteCommand calls Error, * control will be passed back to the main loop, after * executing any additional handler code.  (The error * message is printed by the Error routine, so it is * often the case that no additional work is needed.) * * 2.  Handling control-C * * The following code extends the example above so that * typing ^C also returns to top-level. * *     #include <signal.h> * *     static exception ControlCException; *     static int errorCount = 0; *     static int ControlCHandler(); * *     main() *     { *         string cmd; * *         signal(SIGINT, ControlCHandler); *         while (TRUE) { *             try { *                 printf("> "); *                 cmd = ReadCommand(); *                 ExecuteCommand(cmd); *             except(ControlCException); *                 printf("^C\n"); *                 signal(SIGINT, ControlCHandler); *             except(ErrorException) *                 errorCount++; *             } endtry *         } *     } * *     static int ControlCHandler() *     { *         raise(ControlCException); *     } *//* * Actual interface specification * ------------------------------ * Most of the implementation of the exception mechanism is * actually done in the macros defined by this file. * Clients should ordinarily be able to read the description * above and ignore the detailed code below. */#include <setjmp.h>#include <string.h>#include "genlib.h"/* Define parameters and error status indicators */#define MaxExceptionsPerScope 10#define ETooManyExceptClauses 101#define EUnhandledException 102/* Codes to keep track of the state of the try handler */#define ES_Initialize 0#define ES_EvalBody 1#define ES_Exception 2/* * Type: exception * --------------- * Exceptions are specified by their address, so that the * actual structure does not matter.  Strings are used here * so that exporters of exceptions can store the exception * name for the use of debuggers and other tools. */typedef struct { string name; } exception;/* * Type: context_block * ------------------- * This structure is used internally to maintain a chain of * exception scopes on the control stack. */typedef struct ctx_block {    jmp_buf jmp;    int nx;    exception *array[MaxExceptionsPerScope];    exception *id;    void *value;    string name;    struct ctx_block *link;} context_block;/* Declare the built-in exceptions */extern exception ErrorException;extern exception ANY;/* Declare a global pointer to the context stack */extern context_block *exceptionStack;/* * Function: RaiseException * Usage: RaiseException(&e, name, value); * --------------------------------------- * This function is called by the raise macro and does the * work necessary to raise the exception.  See the exception.c file * for details.  Clients do not ordinarily call this directly. */void RaiseException(exception *e, string name, void *value);/* * Function: HandlerExists * Usage: if (HandlerExists(&e)) ... * --------------------------------- * Determines whether a handler exists for an exception in * the dynamically enclosing scope.  Intended only for use * by special clients, such as the Error package. */bool HandlerExists(exception *e);/* Define the pseudo-functions for raise and try */#define raise(e) RaiseException(&e, #e, NULL)#define try \      { \          jmp_buf _tmpbuf; \          context_block _ctx; \          volatile int _es; \          _es = ES_Initialize; \          _ctx.nx = 0; \          _ctx.link = exceptionStack; \          exceptionStack = (context_block *) &_ctx; \          if (setjmp(_tmpbuf) != 0) _es = ES_Exception; \          memcpy((void *) _ctx.jmp, (void *) _tmpbuf, sizeof(jmp_buf)); \          while (1) { \              if (_es == ES_EvalBody)#define except(e) \                  if (_es == ES_EvalBody) exceptionStack = _ctx.link; \                  break; \              } \              if (_es == ES_Initialize) { \                  if (_ctx.nx >= MaxExceptionsPerScope) \                      exit(ETooManyExceptClauses); \                  _ctx.array[_ctx.nx++] = &e; \              } else if (_ctx.id == &e || &e == &ANY) { \                  exceptionStack = _ctx.link;#define endtry \              if (_es != ES_Initialize) break; \              _es = ES_EvalBody; \          } \      }#define GetExceptionName() _ctx.name#define GetExceptionValue() _ctx.value#define GetCurrentException() _ctx.id#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美三级在线视频| 国产精品乱码妇女bbbb| 久久久亚洲高清| 亚洲精品久久久蜜桃| 狠狠色狠狠色综合系列| 欧美做爰猛烈大尺度电影无法无天| 精品人在线二区三区| 亚洲制服丝袜av| 91丨九色丨蝌蚪富婆spa| 欧美大片一区二区| 五月婷婷另类国产| 91国模大尺度私拍在线视频| 中文字幕精品在线不卡| 黄一区二区三区| 日韩三级免费观看| 蜜臀精品久久久久久蜜臀| 日本大香伊一区二区三区| 中文在线资源观看网站视频免费不卡| 美脚の诱脚舐め脚责91| 欧美精品在线观看播放| 亚洲午夜在线视频| 色哟哟精品一区| 日韩美女视频一区| 成人免费毛片嘿嘿连载视频| 久久久99免费| 国模娜娜一区二区三区| 精品国产伦一区二区三区免费| 五月天久久比比资源色| 欧美日本韩国一区| 丝袜脚交一区二区| 欧美一区二区女人| 奇米精品一区二区三区在线观看| 欧美无人高清视频在线观看| |精品福利一区二区三区| 99久久婷婷国产综合精品| 中文一区二区完整视频在线观看| 国v精品久久久网| 亚洲狠狠丁香婷婷综合久久久| 成人综合婷婷国产精品久久 | 理论电影国产精品| 制服丝袜成人动漫| 蜜桃精品视频在线| 91精品国产欧美一区二区| 美女被吸乳得到大胸91| 精品粉嫩aⅴ一区二区三区四区| 久久不见久久见免费视频7| 久久久亚洲精华液精华液精华液| 国产米奇在线777精品观看| 国产欧美日韩视频在线观看| 成人精品电影在线观看| 一区二区三区日本| 制服丝袜av成人在线看| 国产中文一区二区三区| 国产精品美女久久福利网站| 色天使色偷偷av一区二区| 午夜久久久影院| 久久综合九色综合欧美亚洲| 国产91精品露脸国语对白| 国产精品电影一区二区| 欧美日韩一区二区三区不卡| 蜜芽一区二区三区| 国产精品福利av| 欧美一区二区三区视频免费| 国产成人自拍高清视频在线免费播放| 亚洲激情男女视频| 欧美成人猛片aaaaaaa| www.日韩在线| 另类小说欧美激情| 日韩一区有码在线| 日韩精品一区二区三区视频播放 | 性感美女极品91精品| 精品久久99ma| 一本一本大道香蕉久在线精品 | 91超碰这里只有精品国产| 国产成人精品免费| 日韩国产精品大片| 国产精品国产三级国产aⅴ中文| 欧美日韩高清影院| 成人app软件下载大全免费| 人妖欧美一区二区| 亚洲欧美偷拍卡通变态| 精品国产免费一区二区三区四区 | www成人在线观看| 欧美性色黄大片| 成人一区二区三区| 麻豆精品国产传媒mv男同| 亚洲伦理在线免费看| 国产精品婷婷午夜在线观看| 3atv一区二区三区| 欧美视频完全免费看| 成人激情电影免费在线观看| 日本少妇一区二区| 亚洲一区二区美女| 亚洲欧洲三级电影| 欧美国产精品一区| 精品少妇一区二区三区日产乱码| 欧美在线短视频| 99久久久久免费精品国产| 国产成人福利片| 紧缚捆绑精品一区二区| 日本不卡1234视频| 午夜久久电影网| 午夜欧美电影在线观看| 一区二区三区精品| 亚洲免费观看高清在线观看| 日本一区二区免费在线| 国产日产欧美一区二区视频| ww久久中文字幕| 日韩精品一区二区三区视频| 日韩三级伦理片妻子的秘密按摩| 88在线观看91蜜桃国自产| 欧美日韩高清影院| 在线电影院国产精品| 欧美人妇做爰xxxⅹ性高电影| 欧洲一区二区av| 欧美在线观看一区二区| 欧美色倩网站大全免费| 欧美日韩www| 日韩一区二区视频| 精品国产伦理网| 国产精品免费久久久久| 亚洲免费观看高清完整版在线观看 | 国产福利一区二区| 成人性生交大片免费看视频在线| 国产成人免费xxxxxxxx| 成人丝袜高跟foot| 色综合久久久久综合体桃花网| 日本韩国一区二区| 国产欧美日韩不卡免费| 中文字幕亚洲一区二区va在线| 亚洲欧美日韩在线不卡| 亚洲午夜一区二区三区| 日一区二区三区| 国产一区二区三区免费观看| 国产91综合网| 色天使色偷偷av一区二区| 欧美日韩另类一区| 久久综合久久鬼色中文字| 国产精品国产三级国产普通话99 | 欧洲一区在线电影| 91精品国产综合久久精品| 久久无码av三级| 亚洲色图视频网站| 日韩avvvv在线播放| 韩国女主播成人在线| 99久久精品国产网站| 欧美日本一道本| 国产日韩欧美a| 亚洲一区在线播放| 国产在线视频一区二区三区| 99久久精品情趣| 欧美一级一区二区| 亚洲欧洲另类国产综合| 日本一区中文字幕| 99精品一区二区| 日韩精品中文字幕在线不卡尤物 | 色综合色综合色综合| 日韩免费观看2025年上映的电影| 国产精品久久久久久久久图文区| 亚洲成人动漫在线观看| 国产成人精品免费网站| 在线不卡a资源高清| 中文字幕在线观看不卡| 麻豆中文一区二区| 在线免费观看日本一区| 久久免费偷拍视频| 三级在线观看一区二区 | 亚洲午夜免费电影| 成人网在线播放| www精品美女久久久tv| 亚洲一区二区精品视频| 成人高清伦理免费影院在线观看| 日韩午夜精品电影| 亚洲一区二区五区| 91免费小视频| 中文一区一区三区高中清不卡| 蜜臀av性久久久久蜜臀aⅴ| 色婷婷av一区二区三区gif| 欧美韩国日本一区| 国产揄拍国内精品对白| 欧美一区二区大片| 天天操天天色综合| 日本高清不卡在线观看| 亚洲视频在线观看一区| 成人性色生活片| 国产女人aaa级久久久级| 国产在线精品一区在线观看麻豆| 欧美一区二区精品在线| 日韩福利视频网| 欧美日韩国产一区| 亚洲国产中文字幕| 欧美三级日韩三级| 曰韩精品一区二区| 欧美色图12p| 午夜精品久久久久久久| 欧美性猛交xxxx黑人交| 亚洲午夜精品在线| 欧美日韩亚洲综合一区| 亚洲r级在线视频| 欧美日韩国产免费一区二区|