]> granicus.if.org Git - graphviz/commitdiff
Add smyrna to main graphviz tree
authorellson <devnull@localhost>
Wed, 23 Jan 2008 20:52:43 +0000 (20:52 +0000)
committerellson <devnull@localhost>
Wed, 23 Jan 2008 20:52:43 +0000 (20:52 +0000)
lib/utilities/Makefile.am [new file with mode: 0644]
lib/utilities/abstring.c [new file with mode: 0755]
lib/utilities/abstring.h [new file with mode: 0755]

diff --git a/lib/utilities/Makefile.am b/lib/utilities/Makefile.am
new file mode 100644 (file)
index 0000000..02c7966
--- /dev/null
@@ -0,0 +1,23 @@
+# $Id$ $Revision$
+# ## Process this file with automake to produce Makefile.in
+#
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/cmd/smyrna \
+       -I$(top_srcdir)/lib/utilities \
+       -I$(top_srcdir)/lib/xdot \
+       -I$(top_srcdir)/lib/cgraph \
+       -I$(top_srcdir)/lib/cdt \
+       $(GTK_CFLAGS) $(GTKGL_CFLAGS) $(GTKGLEXT_CFLAGS) $(GLADE_CFLAGS) $(FREETYPE2_CFLAGS)
+
+if WITH_SMYRNA
+noinst_HEADERS = \
+       abstring.h glTexFontDefs.h glTexFont.h glTexFontInclude.h \
+       glTexFontTGA.h opengl_pango.h selection.h 
+
+noinst_LTLIBRARIES = libutilities_C.la
+endif
+
+libutilities_C_la_SOURCES = \
+       abstring.c glTexFont.c glTexFontColor.c glTexFontTGA.c \
+       opengl_pango.c selection.c
diff --git a/lib/utilities/abstring.c b/lib/utilities/abstring.c
new file mode 100755 (executable)
index 0000000..657568a
--- /dev/null
@@ -0,0 +1,71 @@
+/* $Id$ $Revision$ */
+/* vim:set shiftwidth=4 ts=8: */
+
+/**********************************************************
+*      This software is part of the graphviz package      *
+*                http://www.graphviz.org/                 *
+*                                                         *
+*            Copyright (c) 1994-2004 AT&T Corp.           *
+*                and is licensed under the                *
+*            Common Public License, Version 1.0           *
+*                      by AT&T Corp.                      *
+*                                                         *
+*        Information and Software Systems Research        *
+*              AT&T Research, Florham Park NJ             *
+**********************************************************/
+
+//string utilities
+//supports memory allocation
+//this library works with \0 terminated strings
+#include "stdio.h"
+#include "abstring.h"
+#define MAXSTRINGLENGTH        1000
+int ABLength(char* s)
+{
+       //length does not include the \0
+       int id=0;
+       while ((s[id]) && (id < MAXSTRINGLENGTH))
+               id++;
+       if (id==MAXSTRINGLENGTH)
+               return -1;
+       else
+               return id;
+}
+char* ABSet(char* s)
+{
+       char* a;
+       a=(char*)realloc(a, ABLength(s)+1);     
+       strcpy(a,s);
+}
+char* ABJoin(char* s1,char* s2)
+{
+       char* a;
+       int i=0;
+       a=(char*)realloc(a, ABLength(s1)+ABLength(s2)+1);       
+
+       a=strncat(a, s1,ABLength(s1));
+       a=strncat(a, s2,ABLength(s2)+1);
+
+}
+
+int ABRemove(char** s1,char s2)
+{
+       
+       int cursor,cursor2;
+       char BUFFER[255];
+       char* test=*s1;
+       cursor=0;
+       cursor2=0;
+       for (cursor=0;(*s1)[cursor] != '\0' ; cursor ++)
+       {
+               if ((*s1)[cursor] != s2)
+               {
+                       BUFFER[cursor2]=(*s1)[cursor];
+                       cursor2++;
+               }
+       }
+       BUFFER[cursor2]='\0';
+       *s1=realloc(*s1,strlen(BUFFER)+1);
+       strcpy(*s1,BUFFER);
+
+}
diff --git a/lib/utilities/abstring.h b/lib/utilities/abstring.h
new file mode 100755 (executable)
index 0000000..02e72a6
--- /dev/null
@@ -0,0 +1,34 @@
+/* $Id$ $Revision$ */
+/* vim:set shiftwidth=4 ts=8: */
+
+/**********************************************************
+*      This software is part of the graphviz package      *
+*                http://www.graphviz.org/                 *
+*                                                         *
+*            Copyright (c) 1994-2004 AT&T Corp.           *
+*                and is licensed under the                *
+*            Common Public License, Version 1.0           *
+*                      by AT&T Corp.                      *
+*                                                         *
+*        Information and Software Systems Research        *
+*              AT&T Research, Florham Park NJ             *
+**********************************************************/
+
+//string utilities
+//supports memory allocation
+//this library works with \0 terminated strings
+
+#include "viewport.h"
+int ABLength(char* s);
+char* ABSet(char* s);
+char* ABJoin(char* s1,char* s2);
+int ABRemove(char** s1,char s2);
+//char* ABTrim(char* s);
+//char* ABRemove(char* s,char* param)
+
+
+
+//char* ABSubString(char* s,int a,int b);
+//char* ABUpperCase(char* s);
+//char* ABLowerCase(char* s);
+