?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /* asmfile.h - declarations for "asmfile.c".
  2.  
  3.    This is free and unencumbered software released into the public domain.
  4.    For more information, please refer to <http://unlicense.org>. */
  5.  
  6. #ifndef _ASMFILE_H_INCLUDED
  7. #define _ASMFILE_H_INCLUDED
  8.  
  9. #include "defs.h"
  10.  
  11. #include <stdbool.h>
  12. #include "l_list.h"
  13.  
  14. // Assembler file structure
  15.  
  16. struct asm_file_t
  17. {
  18.     char *data;
  19.     long size;
  20.     long pos;
  21.     long line;
  22.     long line_start;
  23.     long line_end;
  24. };
  25.  
  26. void asm_file_clear (struct asm_file_t *self);
  27.  
  28. // Returns "true" on success.
  29. bool asm_file_load (struct asm_file_t *self, const char *name);
  30.  
  31. // Returns "true" on success.
  32. bool asm_file_eof (struct asm_file_t *self);
  33.  
  34. // Returns "true" on success.
  35. bool asm_file_eol (struct asm_file_t *self);
  36.  
  37. // Returns "true" on success.
  38. bool asm_file_next_line (struct asm_file_t *self, const char **s, unsigned *len);
  39.  
  40. void asm_file_free (struct asm_file_t *self);
  41.  
  42. #endif  // !_ASMFILE_H_INCLUDED
  43.