ReactOS  0.4.10-dev-509-g12e8d7f
raisecond.c File Reference
#include <schily/mconfig.h>
#include <schily/stdio.h>
#include <schily/standard.h>
#include <schily/sigblk.h>
#include <schily/unistd.h>
#include <schily/stdlib.h>
#include <schily/string.h>
#include <schily/avoffset.h>
#include <schily/schily.h>
Include dependency graph for raisecond.c:

Go to the source code of this file.

Macros

#define STDERR_FILENO   2
 
#define eprints(a)   (void)write(STDERR_FILENO, (a), sizeof (a)-1)
 
#define eprintl(a)   (void)write(STDERR_FILENO, (a), strlen(a))
 
#define is_even(p)   ((((long)(p)) & 1) == 0)
 
#define even(p)   (((long)(p)) & ~1L)
 
#define next_frame(vp)   vp = (((SIGBLK *)(vp))->sb_savfp);
 

Functions

LOCAL void raiseabort __PR ((const char *))
 
LOCAL BOOL framehandle __PR ((SIGBLK *, const char *, const char *, long))
 
EXPORT void raisecond (char *signame, long arg2) const
 
LOCAL BOOL framehandle (SIGBLK *sp, const char *handlename, const char *signame, long arg2)
 
LOCAL void raiseabort (char *signame) const
 

Variables

EXPORT SIGBLK__roothandle
 

Macro Definition Documentation

#define eprintl (   a)    (void)write(STDERR_FILENO, (a), strlen(a))

Definition at line 47 of file raisecond.c.

Referenced by raiseabort().

#define eprints (   a)    (void)write(STDERR_FILENO, (a), sizeof (a)-1)

Definition at line 46 of file raisecond.c.

Referenced by raiseabort().

#define even (   p)    (((long)(p)) & ~1L)

Definition at line 50 of file raisecond.c.

#define is_even (   p)    ((((long)(p)) & 1) == 0)

Definition at line 49 of file raisecond.c.

#define next_frame (   vp)    vp = (((SIGBLK *)(vp))->sb_savfp);

Definition at line 84 of file raisecond.c.

Referenced by D3DXLoadMeshHierarchyFromXInMemory(), and raisecond().

#define STDERR_FILENO   2

Definition at line 44 of file raisecond.c.

Function Documentation

LOCAL void raiseabort __PR ( (const char *)  )
LOCAL BOOL framehandle __PR ( (SIGBLK *, const char *, const char *, long )
LOCAL BOOL framehandle ( SIGBLK sp,
const char handlename,
const char signame,
long  arg2 
)

Definition at line 145 of file raisecond.c.

Referenced by raisecond().

150 {
151  for (; sp; sp = sp->sb_signext) {
152  if (sp->sb_signame != NULL &&
153  streql(sp->sb_signame, handlename)) {
154  if (sp->sb_sigfun == NULL) { /* deactivated */
155  return (FALSE);
156  } else {
157  return (*sp->sb_sigfun)(signame,
158  sp->sb_sigarg, arg2);
159  }
160  }
161  }
162  return (FALSE);
163 }
long sb_sigarg
Definition: sigblk.h:39
EXPORT int streql(char *a, const char *b) const
Definition: streql.c:23
struct sigblk * sb_signext
Definition: sigblk.h:32
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
Definition: glext.h:9514
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
const char * sb_signame
Definition: sigblk.h:34
static const WCHAR sp[]
Definition: suminfo.c:288
LOCAL void raiseabort ( char signame) const

Definition at line 166 of file raisecond.c.

Referenced by raisecond().

168 {
169  eprints("Condition not caught: "); eprintl(signame); eprints(".\n");
170  abort();
171  /* NOTREACHED */
172 }
#define eprintl(a)
Definition: raisecond.c:47
#define abort()
Definition: i386-dis.c:35
#define eprints(a)
Definition: raisecond.c:46
EXPORT void raisecond ( char signame,
long  arg2 
) const

Definition at line 100 of file raisecond.c.

Referenced by _cvmod(), checkfmt(), and filewrite().

103 {
104  register void *vp = NULL;
105 
106 #ifdef HAVE_SCANSTACK
107  /*
108  * As the SCO OpenServer C-Compiler has a bug that may cause
109  * the first function call to getfp() been done before the
110  * new stack frame is created, we call getfp() twice.
111  */
112  (void) getfp();
113  vp = getfp();
114  next_frame(vp);
115 #else
116  vp = __roothandle;
117 #endif
118 
119  while (vp) {
120  if (framehandle((SIGBLK *)vp, signame, signame, arg2))
121  return;
122  else if (framehandle((SIGBLK *)vp, "any_other", signame, arg2))
123  return;
124 #ifdef HAVE_SCANSTACK
125  vp = (struct frame *)((SIGBLK *)vp)->sb_savfp;
126 #endif
127  next_frame(vp);
128  }
129  /*
130  * No matching handler that signals success found.
131  * Print error message and abort.
132  */
133  raiseabort(signame);
134  /* NOTREACHED */
135 }
LOCAL void raiseabort(char *signame) const
Definition: raisecond.c:166
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
Definition: glext.h:9514
Definition: sigblk.h:30
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
smooth NULL
Definition: ftsmooth.c:416
LOCAL BOOL framehandle(SIGBLK *sp, const char *handlename, const char *signame, long arg2)
Definition: raisecond.c:145
#define next_frame(vp)
Definition: raisecond.c:84
EXPORT SIGBLK * __roothandle
Definition: raisecond.c:81

Variable Documentation

EXPORT SIGBLK* __roothandle

Definition at line 81 of file raisecond.c.

Referenced by raisecond().