?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. /*-------------------------------------------------------------------------
  2.   setjmp.h - header file for setjmp & longjmp ANSI routines
  3.  
  4.              Written By -  Sandeep Dutta . sandeep.dutta@usa.net (1999)
  5.  
  6.    This program is free software; you can redistribute it and/or modify it
  7.    under the terms of the GNU General Public License as published by the
  8.    Free Software Foundation; either version 2, or (at your option) any
  9.    later version.
  10.    
  11.    This program is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.    GNU General Public License for more details.
  15.    
  16.    You should have received a copy of the GNU General Public License
  17.    along with this program; if not, write to the Free Software
  18.    Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19.    
  20.    In other words, you are welcome to use, share and improve this program.
  21.    You are forbidden to forbid anyone else to use, share and improve
  22.    what you give them.   Help stamp out software-hoarding!  
  23. -------------------------------------------------------------------------*/
  24.  
  25. #ifndef SDCC_SETJMP_H
  26. #define SDCC_SETJMP_H
  27.  
  28. #define SP_SIZE         1
  29.  
  30. #ifdef SDCC_STACK_AUTO
  31. #define BP_SIZE         SP_SIZE
  32. #else
  33. #define BP_SIZE         0
  34. #endif
  35.  
  36. #ifdef SDCC_USE_XSTACK
  37. #define SPX_SIZE        1
  38. #else
  39. #define SPX_SIZE        0
  40. #endif
  41.  
  42. #define BPX_SIZE        SPX_SIZE
  43.  
  44. #define RET_SIZE        2
  45.  
  46. typedef unsigned char jmp_buf[RET_SIZE + SP_SIZE + BP_SIZE + SPX_SIZE + BPX_SIZE];
  47.  
  48. int setjmp (jmp_buf);
  49. int longjmp(jmp_buf, int);
  50.  
  51. #undef RET_SIZE
  52. #undef SP_SIZE
  53. #undef BP_SIZE
  54. #undef SPX_SIZE
  55. #undef BPX_SIZE
  56.  
  57. #endif
  58.