[augeas-devel] [PATCH 1 of 7] Remove src/config.h

David Lutterkort dlutter at redhat.com
Thu May 29 23:56:43 UTC 2008


9 files changed, 41 insertions(+), 77 deletions(-)
src/Makefile.am |    2 -
src/augeas.c    |    1 
src/augparse.c  |    1 
src/augtool.c   |    1 
src/config.h    |   70 -------------------------------------------------------
src/internal.h  |   40 +++++++++++++++++++++++++++++++
src/memory.c    |    1 
src/syntax.c    |    1 
src/transform.c |    1 


# HG changeset patch
# User David Lutterkort <dlutter at redhat.com>
# Date 1212104363 25200
# Node ID 60d5b5f6f78ec966fcfc14fe0bdda60cd69c4a4a
# Parent  a6fd47392396fee1dda045d364411ee5991a1713
Remove src/config.h

It was a bad idea to begin with; fold the contents into internal.h and make
room for a generated config.h

diff -r a6fd47392396 -r 60d5b5f6f78e src/Makefile.am
--- a/src/Makefile.am	Thu May 29 16:38:53 2008 -0700
+++ b/src/Makefile.am	Thu May 29 16:39:23 2008 -0700
@@ -12,7 +12,7 @@ bin_PROGRAMS = augtool augparse
 
 include_HEADERS = augeas.h fa.h
 
-libaugeas_la_SOURCES = augeas.h augeas.c config.h \
+libaugeas_la_SOURCES = augeas.h augeas.c \
 	internal.h internal.c \
 	memory.h memory.c ref.h \
         syntax.c syntax.h parser.y builtin.c lens.c lens.h regexp.c \
diff -r a6fd47392396 -r 60d5b5f6f78e src/augeas.c
--- a/src/augeas.c	Thu May 29 16:38:53 2008 -0700
+++ b/src/augeas.c	Thu May 29 16:39:23 2008 -0700
@@ -23,7 +23,6 @@
 #include "augeas.h"
 #include "internal.h"
 #include "memory.h"
-#include "config.h"
 #include "syntax.h"
 
 #include <fnmatch.h>
diff -r a6fd47392396 -r 60d5b5f6f78e src/augparse.c
--- a/src/augparse.c	Thu May 29 16:38:53 2008 -0700
+++ b/src/augparse.c	Thu May 29 16:39:23 2008 -0700
@@ -25,7 +25,6 @@
 #include "list.h"
 #include "syntax.h"
 #include "augeas.h"
-#include "config.h"
 
 const char *progname;
 
diff -r a6fd47392396 -r 60d5b5f6f78e src/augtool.c
--- a/src/augtool.c	Thu May 29 16:38:53 2008 -0700
+++ b/src/augtool.c	Thu May 29 16:39:23 2008 -0700
@@ -22,7 +22,6 @@
 
 #include "augeas.h"
 #include "internal.h"
-#include "config.h"
 
 #include <readline/readline.h>
 #include <readline/history.h>
diff -r a6fd47392396 -r 60d5b5f6f78e src/config.h
--- a/src/config.h	Thu May 29 16:38:53 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
- * config.h: commonly used parameters. Most of them should eventually
- * become buildtime cobnfigurables
- *
- * Copyright (C) 2007, 2008 Red Hat Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- *
- * Author: David Lutterkort <dlutter at redhat.com>
- */
-
-#ifndef CONFIG_H_
-#define CONFIG_H_
-
-/* The env var that points to the chroot holding files we may modify.
-   Mostly useful for testing */
-#define AUGEAS_ROOT_ENV "AUGEAS_ROOT"
-
-/* The root for actual file contents */
-#define AUGEAS_FILES_TREE "/files"
-
-/* Augeas reports some information in this subtree */
-#define AUGEAS_META_TREE "/augeas"
-
-/* Information about files */
-#define AUGEAS_META_FILES AUGEAS_META_TREE AUGEAS_FILES_TREE
-
-/* The root directory */
-#define AUGEAS_META_ROOT AUGEAS_META_TREE "/root"
-
-/* How we save files. One of 'backup', 'overwrite' or 'newfile' */
-#define AUGEAS_META_SAVE_MODE AUGEAS_META_TREE "/save"
-
-/* Where the default spec files live. */
-#define AUGEAS_LENS_DIR "/usr/share/augeas/lenses"
-
-/* Name of env var that contains list of paths to search for additional
-   spec files */
-#define AUGEAS_LENS_ENV "AUGEAS_LENS_LIB"
-
-/* Fairly arbitrary bound on the length of the path we
-   accept from AUGEAS_SPEC_ENV */
-#define MAX_ENV_SIZE 4096
-
-/* Character separating paths in a list of paths */
-#define PATH_SEP_CHAR ':'
-
-#endif
-
-
-/*
- * Local variables:
- *  indent-tabs-mode: nil
- *  c-indent-level: 4
- *  c-basic-offset: 4
- *  tab-width: 4
- * End:
- */
diff -r a6fd47392396 -r 60d5b5f6f78e src/internal.h
--- a/src/internal.h	Thu May 29 16:38:53 2008 -0700
+++ b/src/internal.h	Thu May 29 16:39:23 2008 -0700
@@ -34,6 +34,46 @@
 #include <unistd.h>
 #include <errno.h>
 #include <assert.h>
+
+/*
+ * Various parameters about env vars, special tree nodes etc.
+ * Some of them should be turned into buildtime configurables
+ *
+ */
+
+/* The env var that points to the chroot holding files we may modify.
+   Mostly useful for testing */
+#define AUGEAS_ROOT_ENV "AUGEAS_ROOT"
+
+/* The root for actual file contents */
+#define AUGEAS_FILES_TREE "/files"
+
+/* Augeas reports some information in this subtree */
+#define AUGEAS_META_TREE "/augeas"
+
+/* Information about files */
+#define AUGEAS_META_FILES AUGEAS_META_TREE AUGEAS_FILES_TREE
+
+/* The root directory */
+#define AUGEAS_META_ROOT AUGEAS_META_TREE "/root"
+
+/* How we save files. One of 'backup', 'overwrite' or 'newfile' */
+#define AUGEAS_META_SAVE_MODE AUGEAS_META_TREE "/save"
+
+/* Where the default spec files live. */
+#define AUGEAS_LENS_DIR "/usr/share/augeas/lenses"
+
+/* Name of env var that contains list of paths to search for additional
+   spec files */
+#define AUGEAS_LENS_ENV "AUGEAS_LENS_LIB"
+
+/* Fairly arbitrary bound on the length of the path we
+   accept from AUGEAS_SPEC_ENV */
+#define MAX_ENV_SIZE 4096
+
+/* Character separating paths in a list of paths */
+#define PATH_SEP_CHAR ':'
+
 
 #ifdef __GNUC__
 
diff -r a6fd47392396 -r 60d5b5f6f78e src/memory.c
--- a/src/memory.c	Thu May 29 16:38:53 2008 -0700
+++ b/src/memory.c	Thu May 29 16:39:23 2008 -0700
@@ -19,7 +19,6 @@
  *
  */
 
-#include <config.h>
 #include <stdlib.h>
 #include <stddef.h>
 
diff -r a6fd47392396 -r 60d5b5f6f78e src/syntax.c
--- a/src/syntax.c	Thu May 29 16:38:53 2008 -0700
+++ b/src/syntax.c	Thu May 29 16:39:23 2008 -0700
@@ -32,7 +32,6 @@
 
 #include "memory.h"
 #include "syntax.h"
-#include "config.h"
 #include "augeas.h"
 
 /* Extension of source files */
diff -r a6fd47392396 -r 60d5b5f6f78e src/transform.c
--- a/src/transform.c	Thu May 29 16:38:53 2008 -0700
+++ b/src/transform.c	Thu May 29 16:39:23 2008 -0700
@@ -27,7 +27,6 @@
 #include "memory.h"
 #include "augeas.h"
 #include "syntax.h"
-#include "config.h"
 
 static const int fnm_flags = FNM_FILE_NAME;
 static const int glob_flags = GLOB_NOSORT;




More information about the augeas-devel mailing list