#include <assert.h>
#include "sfstr.h"
#include "gvprpipe.h"
-
-
-
-#ifdef _WIN32
-#define STRCASECMP stricmp
-#else
-#include <strings.h>
-#define STRCASECMP strcasecmp
-#endif
+#include "strcasecmp.h"
static attr_t *binarySearch(attr_list * l, char *searchKey);
static int sel_node;
{
const attr_t *a1 = *(attr_t *const *) a;
const attr_t *a2 = *(attr_t *const *) b;
- return STRCASECMP(a1->name, a2->name);
+ return strcasecmp(a1->name, a2->name);
}
static void attr_list_sort(attr_list * l)
while (low <= high) {
middle = (low + high) / 2;
- res = STRCASECMP(searchKey, l->attributes[middle]->name);
+ res = strcasecmp(searchKey, l->attributes[middle]->name);
if (res == 0) {
return l->attributes[middle];
} else if (res < 0) {
middle = (low + high) / 2;
strncpy(buf, l->attributes[middle]->name, strlen(searchKey));
buf[strlen(searchKey)] = '\0';
- res = STRCASECMP(searchKey, buf);
+ res = strcasecmp(searchKey, buf);
if (res == 0) {
return l->attributes[middle];
}
at = sl->attributes[at->index - 1];
strncpy(buf, at->name, strlen(prefix));
buf[strlen(prefix)] = '\0';;
- res = STRCASECMP(prefix, buf);
+ res = strcasecmp(prefix, buf);
}
res = 0;
while ((at->index < sl->attr_count) && (res == 0)) {
at = sl->attributes[at->index + 1];
strncpy(buf, at->name, strlen(prefix));
buf[strlen(prefix)] = '\0';
- res = STRCASECMP(prefix, buf);
+ res = strcasecmp(prefix, buf);
if ((res == 0) && (at->objType[objKind] == 1))
attr_list_add(tl, new_attr_ref(at));
}
for (ind = 0; ind < fl->attr_count; ind++) {
- if (STRCASECMP(prefix, fl->attributes[ind]->name) == 0) { /*an existing attribute */
+ if (strcasecmp(prefix, fl->attributes[ind]->name) == 0) { /*an existing attribute */
Color_Widget_bg("green", glade_xml_get_widget(xml, "txtAttr"));
static void set_refresh_filters(ViewInfo * v, int type, char *name)
{
- if (STRCASECMP(name, "pos") == 0)
+ if (strcasecmp(name, "pos") == 0)
v->refresh.pos = 1;
- if (STRCASECMP(name, "color") == 0)
+ if (strcasecmp(name, "color") == 0)
v->refresh.color = 1;
- if ((STRCASECMP(name, "size") == 0) && (type == AGNODE))
+ if ((strcasecmp(name, "size") == 0) && (type == AGNODE))
v->refresh.nodesize = 1;
- if (STRCASECMP(name, "selected") == 0)
+ if (strcasecmp(name, "selected") == 0)
v->refresh.selection = 1;
- if (STRCASECMP(name, "visible") == 0)
+ if (strcasecmp(name, "visible") == 0)
v->refresh.visibility = 1;
}
#include <gdk/gdk.h>
#include "viewport.h"
#include "memory.h"
+#include "strcasecmp.h"
static char guibuffer[BUFSIZ]; //general purpose buffer
-#ifdef _WIN32
-extern int strcasecmp(const char *s1, const char *s2);
-extern int strncasecmp(const char *s1, const char *s2, unsigned int n);
-#endif
-
GdkWindow *window1;
GtkWidget *statusbar1;
*************************************************************************/
#include "smyrna_utils.h"
#include "memory.h"
+#include "strcasecmp.h"
/* many of these functions are available in libcommon.
* We cannot use those because dependencies cause a great
* deal of libcommon to be brought in, which complicates
#include "arcball.h"
#include "hotkeymap.h"
#include "topviewfuncs.h"
+#include "strcasecmp.h"
/* Forward declarations */
#include <stdio.h> /* need sprintf() */
#include <ctype.h>
#include "cghdr.h"
+#include "strcasecmp.h"
#define EMPTY(s) ((s == 0) || (s)[0] == '\0')
#define MAX(a,b) ((a)>(b)?(a):(b))
return 0;
}
-#ifndef HAVE_STRCASECMP
-
-#include <string.h>
-
-static int strcasecmp(const char *s1, const char *s2)
-{
- while ((*s1 != '\0')
- && (tolower(*(unsigned char *) s1) ==
- tolower(*(unsigned char *) s2))) {
- s1++;
- s2++;
- }
-
- return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);
-}
-#endif
-
/* alphanumeric, '.', '-', or non-ascii; basically, chars used in unquoted ids */
#define is_id_char(c) (isalnum(c) || ((c) == '.') || ((c) == '-') || !isascii(c))
y.output y.tab.[ch] htmlparse.[ch]
EXTRA_DIST = README.imap chars.tcl ps_font_equiv.h \
- strcasecmp.c strncasecmp.c htmlparse.c htmlparse.h \
+ htmlparse.c htmlparse.h \
y.tab.c y.tab.h y.output entities.html entities.tcl \
brewer_colors brewer_lib svgcolor_names svgcolor_lib \
color_names color_lib colortbl.h mksvgfonts.pl
#include "colorprocs.h"
#include "colortbl.h"
#include "memory.h"
+#include "strcasecmp.h"
static char* colorscheme;
-#ifdef _MSC_VER
-extern int strcasecmp(const char *s1, const char *s2);
-extern int strncasecmp(const char *s1, const char *s2, unsigned int n);
-#endif
-
-
static void hsv2rgb(double h, double s, double v,
double *r, double *g, double *b)
{
#include "htmllex.h"
#include "cdt.h"
#include <ctype.h>
+#include "strcasecmp.h"
#ifdef HAVE_EXPAT
#include <expat.h>
#include "pointset.h"
#include "intset.h"
#include "cdt.h"
+#include "strcasecmp.h"
#define DEFAULT_BORDER 1
#define DEFAULT_CELLPADDING 2
#include "gvc.h"
#include "xdot.h"
#include "agxbuf.h"
+#include "strcasecmp.h"
static char *usageFmt =
"Usage: %s [-Vv?] [-(GNE)name=val] [-(KTlso)<val>] <dot files>\n";
#include "render.h"
+#include "strcasecmp.h"
#define NONE 0
#define NODE 1
#include "render.h"
#include "gvio.h"
+#include "strcasecmp.h"
static int N_EPSF_files;
static Dict_t *EPSF_contents;
+++ /dev/null
-/* $Id$ $Revision$ */
-/* vim:set shiftwidth=4 ts=8: */
-
-/*************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************/
-
-#include "config.h"
-
-
-#include <string.h>
-#include <ctype.h>
-
-
-int strcasecmp(const char *s1, const char *s2)
-{
- while ((*s1 != '\0')
- && (tolower(*(unsigned char *) s1) ==
- tolower(*(unsigned char *) s2))) {
- s1++;
- s2++;
- }
-
- return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);
-}
-
+++ /dev/null
-/* $Id$ $Revision$ */
-/* vim:set shiftwidth=4 ts=8: */
-
-/*************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************/
-
-#include "config.h"
-
-
-#include <string.h>
-#include <ctype.h>
-
-int strncasecmp(const char *s1, const char *s2, unsigned int n)
-{
- if (n == 0)
- return 0;
-
- while ((n-- != 0)
- && (tolower(*(unsigned char *) s1) ==
- tolower(*(unsigned char *) s2))) {
- if (n == 0 || *s1 == '\0' || *s2 == '\0')
- return 0;
- s1++;
- s2++;
- }
-
- return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);
-}
-
#include <string.h>
#include "cdt.h"
#include "render.h"
+#include "strcasecmp.h"
static double timesFontWidth[] = {
0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, /* */
#include "entities.h"
#include "logic.h"
#include "gvc.h"
+#include "strcasecmp.h"
#ifdef _WIN32
#define R_OK 4
}
}
-#ifndef WIN32_STATIC
-#ifndef HAVE_STRCASECMP
-
-
-#include <string.h>
-//#include <ctype.h>
-
-
-int strcasecmp(const char *s1, const char *s2)
-{
- while ((*s1 != '\0')
- && (tolower(*(unsigned char *) s1) ==
- tolower(*(unsigned char *) s2))) {
- s1++;
- s2++;
- }
-
- return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);
-}
-
-#endif /* HAVE_STRCASECMP */
-#endif /* WIN32_STATIC */
-
-#ifndef WIN32_STATIC
-#ifndef HAVE_STRNCASECMP
-#include <string.h>
-//#include <ctype.h>
-
-int strncasecmp(const char *s1, const char *s2, unsigned int n)
-{
- if (n == 0)
- return 0;
-
- while ((n-- != 0)
- && (tolower(*(unsigned char *) s1) ==
- tolower(*(unsigned char *) s2))) {
- if (n == 0 || *s1 == '\0' || *s2 == '\0')
- return 0;
- s1++;
- s2++;
- }
-
- return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);
-}
-
-#endif /* HAVE_STRNCASECMP */
-#endif /* WIN32_STATIC */
void gv_free_splines(edge_t * e)
{
int i;
#endif
/*end visual studio*/
-#ifndef HAVE_STRCASECMP
- extern int strcasecmp(const char *s1, const char *s2);
-#endif
-#ifndef HAVE_STRNCASECMP
- extern int strncasecmp(const char *s1, const char *s2, size_t n);
-#endif
-
extern nodequeue *new_queue(int);
extern void free_queue(nodequeue *);
extern void enqueue(nodequeue *, Agnode_t *);
#ifdef SUPPORT_WRITEDATE
#include <time.h>
#endif
+#include "strcasecmp.h"
/* VTX font modifiers */
Y_invert
zmalloc
zrealloc
-strcasecmp
-strncasecmp
colorxlate
fix_fc
gvContextPlugins
#include "gvio.h"
#include "const.h"
-
-#ifndef HAVE_STRCASECMP
-extern int strcasecmp(const char *s1, const char *s2);
-#endif
+#include "strcasecmp.h"
#ifdef _WIN32
#define strdup(x) _strdup(x)
#include "geom.h"
#include "geomprocs.h"
#include "gvcproc.h"
+#include "strcasecmp.h"
extern int emit_once(char *str);
extern shape_desc *find_user_shape(char *name);
extern boolean mapbool(char *s);
-#ifndef HAVE_STRCASECMP
-extern int strcasecmp(const char *s1, const char *s2);
-#endif
-
/* storage for temporary hacks until client API is FP */
static pointf *AF;
static int sizeAF;
#include <string.h>
#include <stdio.h>
#include <ctype.h>
+#include "strcasecmp.h"
#define KINDS(p) ((AGTYPE(p) == AGRAPH) ? "graph" : (AGTYPE(p) == AGNODE) ? "node" : "edge")
static char* colorscheme;
-#ifdef _MSC_VER
-extern int strcasecmp(const char *s1, const char *s2);
-extern int strncasecmp(const char *s1, const char *s2, unsigned int n);
-#endif
-
-
static void hsv2rgb(double h, double s, double v,
double *r, double *g, double *b)
{
*/
#include <tkInt.h>
+#include "strcasecmp.h"
/*
* This value will be set to the number of colors in the color table
#include "csolve_VPSC.h"
#include "quad_prog_vpsc.h"
#endif
+#include "strcasecmp.h"
#define SEPFACT 0.8 /* default esep/sep */
#include "kkutils.h"
#include "pointset.h"
#include "sgd.h"
+#include "strcasecmp.h"
#ifndef HAVE_SRAND48
#define srand48 srand
#include <overlap.h>
#include <uniform_stress.h>
#include <stress_model.h>
+#include "strcasecmp.h"
static void sfdp_init_edge(edge_t * e)
{
#include "gvplugin_render.h"
#include "gvplugin_device.h"
#include "gvcint.h"
+#include "strcasecmp.h"
typedef enum { FORMAT_MIF, } format_type;
#include "gvplugin_device.h"
#include "gvio.h"
#include "gvcint.h"
+#include "strcasecmp.h"
#define LOCALNAMEPREFIX '%'
/* SVG dot array */
static char *sdotarray = "1,5";
-#ifndef HAVE_STRCASECMP
-extern int strcasecmp(const char *s1, const char *s2);
-#endif
-
static void svg_bzptarray(GVJ_t * job, pointf * A, int n)
{
int i;
#include "gvplugin_device.h"
#include "gvio.h"
#include "memory.h"
+#include "strcasecmp.h"
typedef enum { FORMAT_VML, FORMAT_VMLZ, } format_type;
unsigned int graphHeight,graphWidth;
-#ifndef HAVE_STRCASECMP
-extern int strcasecmp(const char *s1, const char *s2);
-#endif
-
/* this is a direct copy fromlib/common/labels.c */
static int xml_isentity(char *s)
{
#include <string.h>
#include "gvplugin_textlayout.h"
#include "gd.h"
+#include "strcasecmp.h"
#ifdef HAVE_GD_FREETYPE
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#include "strcasecmp.h"
/* FIXME - the following declaration should be removed
* when configure is coordinated with flags passed to the
#include "tcldot.h"
+#include "strcasecmp.h"
size_t Tcldot_string_writer(GVJ_t *job, const char *s, size_t len)
{