summaryrefslogtreecommitdiff
path: root/sid/sidplay-libs-2.1.0/libsidutils/src/ini/headings.h
diff options
context:
space:
mode:
Diffstat (limited to 'sid/sidplay-libs-2.1.0/libsidutils/src/ini/headings.h')
-rw-r--r--sid/sidplay-libs-2.1.0/libsidutils/src/ini/headings.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/sid/sidplay-libs-2.1.0/libsidutils/src/ini/headings.h b/sid/sidplay-libs-2.1.0/libsidutils/src/ini/headings.h
new file mode 100644
index 00000000..2f7fcf74
--- /dev/null
+++ b/sid/sidplay-libs-2.1.0/libsidutils/src/ini/headings.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+ headings.h - Section Heading Manipulation Functions
+
+ -------------------
+ begin : Fri Apr 21 2000
+ copyright : (C) 2000 by Simon White
+ email : s_a_white@email.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef _headings_h_
+#define _headings_h_
+
+#include <stdio.h>
+#include "ini.h"
+
+//*******************************************************************************************************************
+// Data structure definitions
+//*******************************************************************************************************************
+struct keys_tag;
+struct ini_t;
+
+// Linked list structure for holding section/heading information.
+struct section_tag
+{
+ char *heading;
+ struct key_tag *first;
+ struct key_tag *last;
+ struct key_tag *selected;
+ struct section_tag *pNext;
+ struct section_tag *pPrev;
+
+#ifdef INI_USE_HASH_TABLE
+ unsigned long crc;
+ struct key_tag *keys[256];
+ struct section_tag *pNext_Acc;
+ struct section_tag *pPrev_Acc;
+#endif // INI_USE_HASH_TABLE
+};
+
+static struct section_tag *__ini_addHeading (struct ini_t *ini, char *heading);
+static struct section_tag *__ini_faddHeading (struct ini_t *ini, FILE *file, long pos, size_t length);
+static struct section_tag *__ini_createHeading (struct ini_t *ini, char *heading);
+static void __ini_deleteHeading (struct ini_t *ini);
+static struct section_tag *__ini_locateHeading (struct ini_t *ini, char *heading);
+
+#endif // _headings_h_