]> git.sur5r.net Git - cc65/blobdiff - src/cc65/input.h
Fixed a bug that caused problems locating the last parameter of a function
[cc65] / src / cc65 / input.h
index e938d6613fac15149dac728b4ce75c769241340f..ad291c0f82648adec2d2ea022a9c50ede3196d85 100644 (file)
 
 
 
+#include <stdio.h>
+
+
+
+/*****************************************************************************/
+/*                                  data                                    */
+/*****************************************************************************/
+
+
+
+/* Maximum length of an input line and the corresponding char array */
+#define LINEMAX                4095
+#define LINESIZE       LINEMAX+1
+
+/* Input line stuff */
+extern char* line;
+extern const char* lptr;               /* ### Remove this */
+
+/* Current and next input character */
+extern char CurC;
+extern char NextC;
+
+/* Struct that describes an input file */
+typedef struct IFile IFile;
+struct IFile {
+    unsigned       Index;      /* File index */
+    unsigned       Usage;      /* Usage counter */
+    unsigned long   Size;       /* File size */
+    unsigned long   MTime;      /* Time of last modification */
+    char                   Name[1];    /* Name of file (dynamically allocated) */
+};
+
+
+
 /*****************************************************************************/
 /*                                  Code                                    */
 /*****************************************************************************/
@@ -50,6 +84,18 @@ void OpenMainFile (const char* Name);
 void OpenIncludeFile (const char* Name, unsigned DirSpec);
 /* Open an include file and insert it into the tables. */
 
+void ClearLine (void);
+/* Clear the current input line */
+                                                            
+void InitLine (const char* Buf);
+/* Initialize lptr from Buf and read CurC and NextC from the new input line */
+
+void NextChar (void);
+/* Read the next character from the input stream and make CurC and NextC
+ * valid. If end of line is reached, both are set to NUL, no more lines
+ * are read by this function.
+ */
+
 int NextLine (void);
 /* Get a line from the current input. Returns 0 on end of file. */
 
@@ -59,6 +105,9 @@ const char* GetCurrentFile (void);
 unsigned GetCurrentLine (void);
 /* Return the line number in the current input file */
 
+void WriteDependencies (FILE* F, const char* OutputFile);
+/* Write a makefile dependency list to the given file */
+
 
 
 /* End of input.h */