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

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

?? cexcept.h

?? Borland C++BuilderT 6 Developer s Guide
?? H
字號:
/*===
cexcept.h 1.0.0 (2000-Jun-21-Wed)
Adam M. Costello <amc@cs.berkeley.edu>

An interface for exception-handling in ANSI C, developed jointly with
Cosmin Truta <cosmin@cs.toronto.edu>.

    Copyright (c) 2000 Adam M. Costello and Cosmin Truta.  Everyone
    is hereby granted permission to do whatever they like with this
    file, provided that if they modify it they take reasonable steps to
    avoid confusing or misleading people about the authors, version,
    and terms of use of the derived file.  The copyright holders make
    no guarantees about the correctness of this file, and are not
    responsible for any damage resulting from its use.

If this interface is used by multiple .c files, they shouldn't include
this header file directly.  Instead, create a wrapper header file that
includes this header file and then invokes the define_exception_type
macro (see below), and let your .c files include that header file.

The interface consists of one type, one well-known name, and six macros.


define_exception_type(type_name);

    This macro is used like an external declaration.  It specifies
    the type of object that gets copied from the exception thrower to
    the exception catcher.  The type_name can be any type that can be
    assigned to, that is, a non-constant arithmetic type, struct, union,
    or pointer.  Examples:

        define_exception_type(int);

        enum exception { out_of_memory, bad_arguments, disk_full };
        define_exception_type(enum exception);

        struct exception { int code; const char *msg; };
        define_exception_type(struct exception);


struct exception_context;

    This type may be used after the define_exception_type() macro has
    been invoked.  A struct exception_context must be known to both
    the thrower and the catcher.  It is expected that there be one
    context for each thread that uses exceptions.  It would certainly
    be dangerous for multiple threads to access the same context.
    One thread can use multiple contexts, but that is likely to be
    confusing and not typically useful.  The application can allocate
    this structure in any way it pleases--automatic, static, or dynamic.
    The application programmer should pretend not to know the structure
    members, which are subject to change.


struct exception_context *the_exception_context;

    The Try/Catch and Throw statements (described below) implicitly
    refer to a context, using the name the_exception_context.  It is
    the application's responsibility to make sure that this name yields
    the address of a mutable (non-constant) struct exception_context
    wherever those statements are used.  Subject to that constraint, the
    application may declare a variable of this name anywhere it likes
    (inside a function, in a parameter list, or externally), and may
    use whatever storage class specifiers (static, extern, etc) or type
    qualifiers (const, volatile) it likes.  Examples:

        static struct exception_context
          * const the_exception_context = &foo;

        { struct exception_context *the_exception_context = bar; ... }

        int blah(struct exception_context *the_exception_context, ...);

        extern struct exception_context the_exception_context[1];

    The last example illustrates a trick that avoids creating a pointer
    object separate from the structure object.

    The name could even be a macro, for example:

        struct exception_context ec_array[numthreads];
        #define the_exception_context (ec_array + thread_id)

    Be aware that the_exception_context is used several times by the
    Try/Catch/Throw macros, so it shouldn't be expensive or have side
    effects.  The expansion must be a drop-in replacement for an
    identifier, so it's safest to put parentheses around it.


void init_exception_context(struct exception_context *ec);

    For context structures allocated statically (by an external
    definition or using the "static" keyword), the implicit
    initialization to all zeros is sufficient, but contexts allocated
    by other means must be initialized using this macro before they
    are used by a Try/Catch statement.  It does no harm to initialize
    a context more than once (by using this macro on a statically
    allocated context, or using this macro twice on the same context),
    but a context must not be re-initialized after it has been used by a
    Try/Catch statement.


Try statement
Catch (expression) statement

    The Try/Catch/Throw macros are capitalized in order to avoid
    confusion with the C++ keywords, which have subtly different
    semantics.

    A Try/Catch statement has a syntax similar to an if/else
    statement, except that the parenthesized expression goes after
    the second keyword rather than the first.  As with if/else,
    there are two clauses, each of which may be a simple statement
    ending with a semicolon or a brace-enclosed compound statement.
    But whereas the else clause is optional, the Catch clause is
    required.  The expression must be a modifiable lvalue (something
    capable of being assigned to) of the exact same type passed to
    define_exception_type().

    If a Throw that uses the same exception context as the Try/Catch is
    executed within the Try clause (typically within a function called
    by the Try clause), and the exception is not caught by a nested
    Try/Catch statement, then a copy of the exception will be assigned
    to the expression, and control will jump to the Catch clause.  If no
    such Throw is executed, then the assignment is not performed, and
    the Catch clause is not executed.

    Regardless of whether an exception is caught, the expression is
    always evaluated exactly once, which is significant if it has side
    effects, for example:

        Try foo();
        Catch (p[++i].e) { ... }

    IMPORTANT: Jumping into or out of a Try clause (for example via
    return, break, continue, goto, longjmp) is forbidden--the compiler
    will not complain, but bad things will happen at run-time.  Jumping
    into or out of a Catch clause is okay, and so is jumping around
    inside a Try clause.  In many cases where one is tempted to return
    from a Try clause, it will suffice to use Throw, and then return
    from the Catch clause.  Another option is to set a flag variable and
    use goto to jump to the end of the Try clause, then check the flag
    after the Try/Catch statement.

    IMPORTANT: The values of any non-volatile automatic variables
    changed within the Try clause are undefined after an exception is
    caught.  Therefore, variables modified inside the Try block whose
    values are needed later outside the Try block must either use static
    storage or be declared with the "volatile" type qualifier.


Throw expression;

    A Throw statement is very much like a return statement, except that
    the expression is required.  Whereas return jumps back to the place
    where the current function was called, Throw jumps back to the Catch
    clause of the innermost enclosing Try clause.  The expression must
    be compatible with the type passed to define_exception_type().  The
    exception must be caught, otherwise the program may crash.

    Slight limitation:  If the expression is a comma-expression it must
    be enclosed in parentheses.


Try statement
Catch_anonymous statement

    When the value of the exception is not needed, a Try/Catch statement
    can use Catch_anonymous instead of Catch (expression).


Everything below this point is for the benefit of the compiler.  The
application programmer should pretend not to know any of it, because it
is subject to change.

===*/


#ifndef CEXCEPT_H
#define CEXCEPT_H


#include <setjmp.h>

#define define_exception_type(etype) \
struct exception__state { \
  etype *exception; \
  jmp_buf env; \
}

struct exception_context { \
  struct exception__state *last; \
  int caught; \
};

#define init_exception_context(ec) ((void)((ec)->last = 0))

#define Catch(e) exception__catch(&(e))
#define Catch_anonymous exception__catch(0)

#define Try \
  { \
    struct exception__state *exception__p, exception__s; \
    int exception__i; \
    exception__p = the_exception_context->last; \
    the_exception_context->last = &exception__s; \
    for (exception__i = 0; ; exception__i = 1) \
      if (exception__i) { \
        if (setjmp(exception__s.env) == 0) { \
          if (&exception__s)

#define exception__catch(e_addr) \
          else { } \
          the_exception_context->caught = 0; \
        } \
        else the_exception_context->caught = 1; \
        the_exception_context->last = exception__p; \
        break; \
      } \
      else exception__s.exception = e_addr; \
  } \
  if (!the_exception_context->caught) { } \
  else

/* Try ends with if(), and Catch begins and ends with else.  This     */
/* ensures that the Try/Catch syntax is really the same as the        */
/* if/else syntax.                                                    */
/*                                                                    */
/* We use &exception__s instead of 1 to appease compilers that        */
/* warn about constant expressions inside if().  Most compilers       */
/* should still recognize that &exception__s is never zero and avoid  */
/* generating test code.                                              */
/*                                                                    */
/* We use the variable exception__i to start the loop at the bottom,  */
/* rather than jump into the loop using a switch statement, to        */
/* appease compilers that warn about jumping into loops.              */

#define Throw \
  for (;; longjmp(the_exception_context->last->env, 1)) \
    if (the_exception_context->last->exception) \
      *the_exception_context->last->exception =


#endif /* CEXCEPT_H */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91亚洲精品乱码久久久久久蜜桃| 成人丝袜高跟foot| 国产欧美一区二区精品性色超碰| 99亚偷拍自图区亚洲| 日日夜夜一区二区| 国产精品久久久久一区二区三区共| 91成人免费在线视频| 捆绑调教美女网站视频一区| 亚洲欧美乱综合| 日韩久久精品一区| 欧美日韩一级视频| 99久久久精品| 精品一区二区三区免费播放| 一区二区三区日韩欧美精品| 久久久精品综合| 日韩欧美123| 欧美日韩视频在线观看一区二区三区| 成人免费视频免费观看| 免费在线观看视频一区| 亚洲一二三级电影| 亚洲品质自拍视频| 国产精品进线69影院| 久久综合久久99| 日韩一区二区电影| 91精品国产色综合久久| 91福利社在线观看| 91视视频在线直接观看在线看网页在线看| 国内精品免费**视频| 日本美女一区二区三区视频| 一区二区三区蜜桃网| 亚洲欧美怡红院| 国产精品理论片在线观看| 国产午夜精品福利| 欧美极品xxx| 久久精品男人的天堂| 久久综合成人精品亚洲另类欧美| 日韩一区二区三区高清免费看看| 欧美夫妻性生活| 欧美一区二区三区视频免费| 欧美女孩性生活视频| 欧美顶级少妇做爰| 欧美日韩一区 二区 三区 久久精品| 欧美性三三影院| 91福利区一区二区三区| 欧美日韩一区二区在线视频| 精品视频免费看| 51久久夜色精品国产麻豆| 制服视频三区第一页精品| 91.xcao| 欧美一区二区网站| 日韩精品在线网站| 2020国产精品自拍| 欧美国产精品久久| 国产精品久久久99| 亚洲精品成a人| 五月天中文字幕一区二区| 日韩在线观看一区二区| 免费的成人av| 国产精品一区免费在线观看| 99在线精品免费| 欧美日韩国产精选| 欧美精品一区二区三区一线天视频 | 亚洲成a人片在线观看中文| 亚洲成在人线免费| 久久电影网站中文字幕| 国产成人亚洲综合a∨猫咪| 色综合天天综合在线视频| 欧美日韩黄视频| 久久综合久久综合久久| 亚洲天堂成人在线观看| 亚洲成人综合网站| 国产成人夜色高潮福利影视| 99re成人在线| 欧美一区二区三区四区视频| 国产日本一区二区| 亚洲国产成人91porn| 狠狠色狠狠色综合| 91美女视频网站| 日韩女优av电影在线观看| 亚洲欧洲成人精品av97| 日韩精品一二区| 成人美女视频在线观看| 欧美视频一区二区三区| 欧美精品一区二区三区蜜臀| 亚洲美腿欧美偷拍| 狠狠色狠狠色综合日日91app| 91麻豆免费在线观看| 精品伦理精品一区| 亚洲黄色小视频| 国产在线精品国自产拍免费| 欧洲精品视频在线观看| 久久久久亚洲蜜桃| 亚洲妇女屁股眼交7| 高清国产午夜精品久久久久久| 欧美日本在线播放| 中文字幕亚洲欧美在线不卡| 日本欧美一区二区在线观看| 99这里都是精品| wwwwww.欧美系列| 日韩和欧美一区二区三区| 不卡大黄网站免费看| 欧美一区二区精品| 亚洲老司机在线| 成人小视频免费观看| 日韩欧美国产一二三区| 亚洲综合网站在线观看| 成人一级视频在线观看| 日韩免费一区二区| 亚洲第一久久影院| 99精品久久99久久久久| 久久久精品黄色| 免费高清不卡av| 欧美老女人第四色| 亚洲激情成人在线| 成人午夜看片网址| 久久亚洲捆绑美女| 男女激情视频一区| 欧日韩精品视频| 亚洲欧洲综合另类| 91蝌蚪国产九色| 中文字幕日韩欧美一区二区三区| 国产精品一二三区| 精品三级av在线| 视频一区国产视频| 在线观看欧美精品| 一区二区三区.www| 色噜噜狠狠成人网p站| 国产精品久线观看视频| 成人av在线网站| 国产精品久久久久久妇女6080 | 图片区小说区区亚洲影院| 日本韩国精品一区二区在线观看| 中文字幕在线不卡| 成人网男人的天堂| 亚洲丝袜美腿综合| 91在线精品一区二区三区| 日韩一区在线免费观看| 色综合视频一区二区三区高清| 国产精品理论片在线观看| 99这里都是精品| 亚洲精品日产精品乱码不卡| 97久久超碰国产精品| 亚洲精品久久久蜜桃| 欧美专区日韩专区| 日韩和欧美一区二区三区| 日韩欧美在线1卡| 蜜桃av噜噜一区| 国产亚洲综合色| 波多野结衣在线一区| 亚洲免费在线电影| 精品视频在线看| 久久99热这里只有精品| 久久蜜桃av一区二区天堂| 岛国精品在线观看| 中文字幕日韩一区| 欧美日韩视频第一区| 日韩国产精品久久久久久亚洲| 日韩免费看的电影| 国产精品亚洲综合一区在线观看| 国产精品青草综合久久久久99| 91视频观看视频| 亚洲成人精品一区二区| 日韩欧美一区二区三区在线| 国产精品资源站在线| 国产精品成人在线观看| 欧美视频日韩视频在线观看| 久久精品国产第一区二区三区| 国产农村妇女毛片精品久久麻豆 | av不卡在线观看| 亚洲一区二区高清| 日韩欧美国产精品一区| 粉嫩aⅴ一区二区三区四区| 一区二区三区 在线观看视频| 欧美疯狂做受xxxx富婆| 国产精品一二三在| 亚洲一区二区三区小说| 精品女同一区二区| 91色九色蝌蚪| 免费人成黄页网站在线一区二区| 国产日韩欧美电影| 欧美性xxxxxxxx| 国产一区二区在线观看免费| 亚洲精品久久久蜜桃| 精品国产一区二区国模嫣然| 91久久国产综合久久| 麻豆国产精品官网| 一区二区三区加勒比av| 精品成人一区二区三区| 91福利视频久久久久| 国产精品一区二区久久精品爱涩| 中文字幕亚洲精品在线观看| 日韩欧美国产一区二区在线播放 | 日本一区二区三区免费乱视频| 欧美在线|欧美| 国产91高潮流白浆在线麻豆| 亚洲免费观看高清完整版在线观看| 91精品国产综合久久久久久久| 99久久婷婷国产综合精品| 裸体在线国模精品偷拍| 一区二区三区成人在线视频|