summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/dynstuff.h
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
commit48540940b6c28bb4378abfeb500ec45a625b37b6 (patch)
tree2ef294c0763e802f91d868bdef4229b6868527de /protocols/Gadu-Gadu/dynstuff.h
parent5c350913f011e119127baeb32a6aedeb4f0d33bc (diff)
initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@2 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/dynstuff.h')
-rw-r--r--protocols/Gadu-Gadu/dynstuff.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/protocols/Gadu-Gadu/dynstuff.h b/protocols/Gadu-Gadu/dynstuff.h
new file mode 100644
index 0000000000..8e36c67ede
--- /dev/null
+++ b/protocols/Gadu-Gadu/dynstuff.h
@@ -0,0 +1,70 @@
+/* $Id: dynstuff.h 4366 2006-12-20 22:40:37Z ono $ */
+
+/*
+ * (C) Copyright 2001-2002 Wojtek Kaniewski <wojtekka@irc.pl>
+ * Dawid Jarosz <dawjar@poczta.onet.pl>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License Version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __DYNSTUFF_H
+#define __DYNSTUFF_H
+
+/* listy */
+
+struct list {
+ void *data;
+ struct list *next;
+};
+
+typedef struct list * list_t;
+
+void *list_add(list_t *list, void *data, int alloc_size);
+void *list_add_sorted(list_t *list, void *data, int alloc_size, int (*comparision)(void *, void *));
+int list_remove(list_t *list, void *data, int free_data);
+int list_count(list_t list);
+int list_destroy(list_t list, int free_data);
+
+/* stringi */
+
+struct string {
+ char *str;
+ int len, size;
+};
+
+typedef struct string * string_t;
+
+string_t string_init(const char *str);
+int string_append(string_t s, const char *str);
+int string_append_n(string_t s, const char *str, int count);
+int string_append_c(string_t s, char ch);
+void string_insert(string_t s, int index, const char *str);
+void string_insert_n(string_t s, int index, const char *str, int count);
+void string_clear(string_t s);
+char *string_free(string_t s, int free_string);
+
+/* tablice stringów */
+
+char **array_make(const char *string, const char *sep, int max, int trim, int quotes);
+char *array_join(char **array, const char *sep);
+void array_add(char ***array, char *string);
+int array_count(char **array);
+int array_contains(char **array, const char *string, int casesensitive);
+void array_free(char **array);
+
+/* rozszerzenia libców */
+
+const char *ditoa(long int i);
+
+#endif /* __DYNSTUFF_H */