diff codetext.c @ 2:ff5e493bc9cb default tip

2003-01-29
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Sat, 13 Oct 2012 21:14:50 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/codetext.c	Sat Oct 13 21:14:50 2012 +0200
@@ -0,0 +1,50 @@
+
+#include <glib.h>
+#include "codetext.h"
+
+/* Tworzy nowy obiekt CodeLIne. */
+CodeLine*
+newCodeLine(CodeText *text)
+{
+    CodeLine *line;
+    
+    line = g_new(CodeLine, 1);
+    line->string = g_string_new("");
+    line->comment = NULL;
+    line->tag_list = NULL;
+    line->label = NULL;
+    line->indent = 0;
+    line->number = ++(text->line_no);
+    return line;
+}
+
+/* Tworzy nowy obiekt CodeTag. */
+CodeTag*
+newCodeTag()
+{
+    CodeTag *tag;
+
+    tag = g_new(CodeTag, 1);
+    tag->group = HG_TEXT;
+    tag->xstart = 0;
+    tag->ystart = 0;
+    tag->xend = 0;
+    tag->yend = 0;
+    tag->node = NULL;
+    return tag;
+}
+
+/* Tworzy nowy obiekt CodeText. */
+CodeText*
+newCodeText()
+{
+    CodeText *text;
+
+    text = g_new(CodeText, 1);
+    text->line_list = NULL;
+    text->tag_stack= NULL;
+    text->last_line = NULL;
+    text->line_no = 0;
+    text->indent = 0;
+    return text;
+}