dccserver: repository: changeset 218385d50d97

Navigation

Views: changelog, tags, manifest, raw zip, gz, bz2,

Rename util.[ch] to strip_path.[ch] to avoid conflict with /usr/include/util.h

changeset 295: 218385d50d97
parent 294:e20f2ea9ba7d
child 296:4cdde547c727
author: Thomas Klausner <tk@giga.or.at>
date: Mon Mar 30 12:28:15 2009 +0200 (17 months ago)
files: child.c dccsend.c lib/Makefile.am lib/strip_path.c lib/strip_path.h lib/util.c lib/util.h
description: Rename util.[ch] to strip_path.[ch] to avoid conflict with /usr/include/util.h
--- a/child.c	Sun Feb 15 19:10:08 2009 +0100
+++ b/child.c	Mon Mar 30 12:28:15 2009 +0200
@@ -65,7 +65,7 @@ void warnx(const char *, ...);
 
 #include "dcc.h"
 #include "io.h"
-#include "util.h"
+#include "strip_path.h"
 
 struct transfer_state {
     char *filename;
--- a/dccsend.c	Sun Feb 15 19:10:08 2009 +0100
+++ b/dccsend.c	Mon Mar 30 12:28:15 2009 +0200
@@ -52,7 +52,7 @@
 #include "dccserver.h"
 #include "dcc.h"
 #include "io.h"
-#include "util.h"
+#include "strip_path.h"
 
 #ifndef HAVE_ERR
 void err(int, const char *, ...);
--- a/lib/Makefile.am	Sun Feb 15 19:10:08 2009 +0100
+++ b/lib/Makefile.am	Mon Mar 30 12:28:15 2009 +0200
@@ -1,6 +1,6 @@ noinst_LIBRARIES=libdcc.a
 noinst_LIBRARIES=libdcc.a
 
-libdcc_a_SOURCES=dcc.c io.c util.c
+libdcc_a_SOURCES=dcc.c io.c strip_path.c
 libdcc_a_LIBADD=$(LIBOBJS)
 
-noinst_HEADERS=dcc.h getaddrinfo.h io.h pollemu.h util.h
+noinst_HEADERS=dcc.h getaddrinfo.h io.h pollemu.h strip_path.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/strip_path.c	Mon Mar 30 12:28:15 2009 +0200
@@ -0,0 +1,50 @@
+/* $NiH$ */
+/*-
+ * Copyright (c) 2003 Thomas Klausner.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution. 
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.  
+ *
+ * THIS SOFTWARE IS PROVIDED BY THOMAS KLAUSNER ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <string.h>
+#include "strip_path.h"
+
+/* some fserves incorrectly include the complete path -- */
+/* strip it off */
+char *
+strip_path(char *p)
+{
+    char *q;
+
+    if ((q=strrchr(p, '/')) != NULL)
+	p = ++q;
+    if ((q=strrchr(p, '\\')) != NULL)
+	p = ++q;
+
+    return p;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/strip_path.h	Mon Mar 30 12:28:15 2009 +0200
@@ -0,0 +1,32 @@
+/* $NiH$ */
+/*-
+ * Copyright (c) 2003 Thomas Klausner.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution. 
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.  
+ *
+ * THIS SOFTWARE IS PROVIDED BY THOMAS KLAUSNER ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+char *strip_path(char *);
--- a/lib/util.c	Sun Feb 15 19:10:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/* $NiH$ */
-/*-
- * Copyright (c) 2003 Thomas Klausner.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above
- *    copyright notice, this list of conditions and the following
- *    disclaimer in the documentation and/or other materials provided
- *    with the distribution. 
- * 3. The name of the author may not be used to endorse or promote
- *    products derived from this software without specific prior
- *    written permission.  
- *
- * THIS SOFTWARE IS PROVIDED BY THOMAS KLAUSNER ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <string.h>
-#include "util.h"
-
-/* some fserves incorrectly include the complete path -- */
-/* strip it off */
-char *
-strip_path(char *p)
-{
-    char *q;
-
-    if ((q=strrchr(p, '/')) != NULL)
-	p = ++q;
-    if ((q=strrchr(p, '\\')) != NULL)
-	p = ++q;
-
-    return p;
-}
-
--- a/lib/util.h	Sun Feb 15 19:10:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/* $NiH$ */
-/*-
- * Copyright (c) 2003 Thomas Klausner.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above
- *    copyright notice, this list of conditions and the following
- *    disclaimer in the documentation and/or other materials provided
- *    with the distribution. 
- * 3. The name of the author may not be used to endorse or promote
- *    products derived from this software without specific prior
- *    written permission.  
- *
- * THIS SOFTWARE IS PROVIDED BY THOMAS KLAUSNER ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-char *strip_path(char *);

Powered by Mercurial.