?login_element?

Subversion Repositories NedoOS

Rev

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

  1. /*
  2.  
  3.   SjASMPlus Z80 Cross Compiler
  4.  
  5.   This is modified sources of SjASM by Aprisobal - aprisobal@tut.by
  6.  
  7.   Copyright (c) 2006 Sjoerd Mastijn
  8.  
  9.   This software is provided 'as-is', without any express or implied warranty.
  10.   In no event will the authors be held liable for any damages arising from the
  11.   use of this software.
  12.  
  13.   Permission is granted to anyone to use this software for any purpose,
  14.   including commercial applications, and to alter it and redistribute it freely,
  15.   subject to the following restrictions:
  16.  
  17.   1. The origin of this software must not be misrepresented; you must not claim
  18.          that you wrote the original software. If you use this software in a product,
  19.          an acknowledgment in the product documentation would be appreciated but is
  20.          not required.
  21.  
  22.   2. Altered source versions must be plainly marked as such, and must not be
  23.          misrepresented as being the original software.
  24.  
  25.   3. This notice may not be removed or altered from any source distribution.
  26.  
  27. */
  28.  
  29. // io_trd.h
  30.  
  31. #ifndef __IO_TRD
  32. #define __IO_TRD
  33.  
  34. enum ETrdFileName { OK, INVALID_EXTENSION, THREE_LETTER_EXTENSION };
  35.  
  36. bool TRD_SaveEmpty(const char* fname, const char label[8]);
  37. ETrdFileName TRD_FileNameToBytes(const char* inputName, byte binName[12], int & nameL);
  38. bool TRD_AddFile(const char* fname, const char* fhobname, int start, int length, int autostart, bool replace, bool addplace, int lengthMinusVars = -1);
  39.  
  40. /**
  41.  * @brief Checks TRD file and return absolute offset + length into the raw file.
  42.  *
  43.  * @param trdname filename of the TRD image (will be passed to GetPath(...))
  44.  * @param filename filename of the requested file inside the TRD image
  45.  * @param offset data offset (0 or more), and return value = absolute offset into TRD file
  46.  * @param length data length (1 or more or INT_MAX to include all), and return value = data length
  47.  * @return int 0 when error, 1 when offset + length are valid values into TRD image file
  48.  */
  49. int TRD_PrepareIncFile(const char* trdname, const char* filename, aint & offset, aint & length);
  50.  
  51. #endif
  52.  
  53. //eof io_trd.h
  54.