?login_element?

Subversion Repositories NedoOS

Rev

Rev 556 | Blame | Compare with Previous | Last modification | View Log | Download

  1. /*
  2.  
  3.   SjASMPlus Z80 Cross Compiler
  4.  
  5.   Copyright (c) 2004-2006 Aprisobal
  6.  
  7.   This software is provided 'as-is', without any express or implied warranty.
  8.   In no event will the authors be held liable for any damages arising from the
  9.   use of this software.
  10.  
  11.   Permission is granted to anyone to use this software for any purpose,
  12.   including commercial applications, and to alter it and redistribute it freely,
  13.   subject to the following restrictions:
  14.  
  15.   1. The origin of this software must not be misrepresented; you must not claim
  16.          that you wrote the original software. If you use this software in a product,
  17.          an acknowledgment in the product documentation would be appreciated but is
  18.          not required.
  19.  
  20.   2. Altered source versions must be plainly marked as such, and must not be
  21.          misrepresented as being the original software.
  22.  
  23.   3. This notice may not be removed or altered from any source distribution.
  24.  
  25. */
  26.  
  27. //sjdefs.h
  28.  
  29. #ifndef __SJDEFS
  30. #define __SJDEFS
  31.  
  32. // version string
  33. #define VERSION "1.20.1"
  34. #define VERSION_NUM "0x00011401"
  35.  
  36. #define LASTPASS 3
  37.  
  38. // output
  39. #define _COUT cout <<
  40. #define _CERR cerr <<
  41. #define _CMDL  <<
  42. #define _ENDL << endl
  43. #define _END ;
  44.  
  45. #ifdef WIN32
  46. #define WIN32_LEAN_AND_MEAN
  47. #define NOMINMAX
  48. #include <windows.h>
  49. #endif
  50.  
  51. #include <cassert>
  52. #include <memory>
  53. #include <algorithm>
  54. #include <stack>
  55. #include <vector>
  56. #include <iostream>
  57. using std::cout;
  58. using std::cerr;
  59. using std::endl;
  60. using std::flush;
  61. #include <stdio.h>
  62. #include <stdlib.h>
  63. #include <string.h>
  64. #include <ctype.h>
  65. #include <limits.h>
  66. #include <math.h>
  67.  
  68. // global defines
  69. #define LINEMAX 2048
  70. #define LINEMAX2 LINEMAX*2
  71. #define LABMAX 64
  72. #define LABTABSIZE 32768
  73. #define FUNTABSIZE 4096
  74. typedef int32_t aint;
  75. typedef uint8_t byte;
  76. typedef uint16_t word;
  77. typedef std::vector<char> stdin_log_t;
  78.  
  79. #ifdef _MSC_VER
  80. #pragma pack(push, 1)
  81. #endif
  82. template <typename T>
  83. struct SAlignSafeCast {
  84.         T       val;
  85. }
  86. #ifndef _MSC_VER
  87.         __attribute__((packed));
  88. #else
  89.         ;
  90. #pragma pack(pop)
  91. #endif
  92.  
  93. #ifndef PATH_MAX
  94. #define PATH_MAX        4096
  95. #endif
  96.  
  97. // not used by sjasmplus, but define it any way to prevent accidental use by code, as MUSL clib is defining it
  98. // https://github.com/z00m128/sjasmplus/issues/193
  99. #ifndef PAGE_SIZE
  100. #define PAGE_SIZE       4096
  101. #endif
  102.  
  103. // include all headers
  104.  
  105. #include "lua_sjasm.h"
  106. #include "devices.h"
  107. #include "support.h"
  108. #include "relocate.h"
  109. #include "tables.h"
  110. #include "reader.h"
  111. #include "parser.h"
  112. #include "z80.h"
  113. #include "directives.h"
  114. #include "sjio.h"
  115. #include "io_cpc.h"
  116. #include "io_err.h"
  117. #include "io_snapshots.h"
  118. #include "io_tape.h"
  119. #include "io_trd.h"
  120. #include "io_tzx.h"
  121. #include "io_nex.h"
  122. #include "sjasm.h"
  123.  
  124. #endif
  125. //eof sjdefs.h
  126.