]> gcc.gnu.org Git - gcc.git/commitdiff
[libcpp] struct deps renaming
authorNathan Sidwell <nathan@acm.org>
Mon, 6 May 2019 11:34:47 +0000 (11:34 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 6 May 2019 11:34:47 +0000 (11:34 +0000)
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00199.html
libcpp/
* include/mkdeps.h: Rename struct deps to struct mkdeps.
* mkdeps.c: Likewise.
* include/cpplib.h (cpp_get_deps): Rename return type..
* directives.c (cpp_get_deps): Likewise.
* internal.h (struct cpp_reader): Rename deps field type.

gcc/c-family/
* c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.

From-SVN: r270905

gcc/c-family/ChangeLog
gcc/c-family/c-opts.c
libcpp/ChangeLog
libcpp/directives.c
libcpp/include/cpplib.h
libcpp/include/mkdeps.h
libcpp/internal.h
libcpp/mkdeps.c

index dcbac101f431863fbede285f0e0b1cbe9115301d..59810b8a0e0a56a40bd1190b5b873e530c010032 100644 (file)
@@ -1,3 +1,7 @@
+2019-05-06  Nathan Sidwell  <nathan@acm.org>
+
+       * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
+
 2019-04-30  Nathan Sidwell  <nathan@acm.org>
 
        * c-common.c (c_common_init_ts): Use MARK_TS_EXP.  Mark SIZEOF_EXPR.
index 454cfa0ee3e157d9ffdfe9527ff7b669e66253dc..bc7ea1769096d921f3a93a86368f72dc9b489e81 100644 (file)
@@ -1277,18 +1277,15 @@ check_deps_environment_vars (void)
 static void
 handle_deferred_opts (void)
 {
-  size_t i;
-  struct deps *deps;
-
   /* Avoid allocating the deps buffer if we don't need it.
      (This flag may be true without there having been -MT or -MQ
      options, but we'll still need the deps buffer.)  */
   if (!deps_seen)
     return;
 
-  deps = cpp_get_deps (parse_in);
+  struct mkdeps *deps = cpp_get_deps (parse_in);
 
-  for (i = 0; i < deferred_count; i++)
+  for (size_t i = 0; i < deferred_count; i++)
     {
       struct deferred_opt *opt = &deferred_opts[i];
 
index 7fe5b5276de68240724b8cd704a7e5bc96965ce0..0e3fc56bc02bf2f6ce4b9fa8090cb3de11ada248 100644 (file)
@@ -1,3 +1,11 @@
+2019-05-06  Nathan Sidwell  <nathan@acm.org>
+
+       * include/mkdeps.h: Rename struct deps to struct mkdeps.
+       * mkdeps.c: Likewise.
+       * include/cpplib.h (cpp_get_deps): Rename return type..
+       * directives.c (cpp_get_deps): Likewise.
+       * internal.h (struct cpp_reader): Rename deps field type.
+
 2019-04-03  Jonathan Wakely  <jwakely@redhat.com>
 
        * files.c (search_path_exhausted): Fix typo in comment.
index 1ada834da17482ebd75fd9ed57312b0e41cd24a7..3ee8bc4053b9c11ccf1835c66b6be8f52064d36e 100644 (file)
@@ -2539,7 +2539,7 @@ cpp_set_callbacks (cpp_reader *pfile, cpp_callbacks *cb)
 }
 
 /* The dependencies structure.  (Creates one if it hasn't already been.)  */
-struct deps *
+struct mkdeps *
 cpp_get_deps (cpp_reader *pfile)
 {
   if (!pfile->deps)
index 87cc6a392136d9ac4317dcd796afbbf038b9c9f1..3edb93dce460d468a51c85c321c93a826feb279e 100644 (file)
@@ -953,7 +953,7 @@ extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int);
 extern cpp_options *cpp_get_options (cpp_reader *);
 extern cpp_callbacks *cpp_get_callbacks (cpp_reader *);
 extern void cpp_set_callbacks (cpp_reader *, cpp_callbacks *);
-extern struct deps *cpp_get_deps (cpp_reader *);
+extern struct mkdeps *cpp_get_deps (cpp_reader *);
 
 /* This function reads the file, but does not start preprocessing.  It
    returns the name of the original file; this is the same as the
index 161291a4f1a4ae6b1a023359de0ec5c0b9eae807..b0e34728b5dc83b1b1d53b061bc88fabb5f98ac0 100644 (file)
@@ -26,54 +26,54 @@ along with this program; see the file COPYING3.  If not see
 /* This is the data structure used by all the functions in mkdeps.c.
    It's quite straightforward, but should be treated as opaque.  */
 
-struct deps;
+struct mkdeps;
 
 /* Create a deps buffer.  */
-extern struct deps *deps_init (void);
+extern struct mkdeps *deps_init (void);
 
 /* Destroy a deps buffer.  */
-extern void deps_free (struct deps *);
+extern void deps_free (struct mkdeps *);
 
 /* Add a set of "vpath" directories. The second argument is a colon-
    separated list of pathnames, like you would set Make's VPATH
    variable to.  If a dependency or target name begins with any of
    these pathnames (and the next path element is not "..") that
    pathname is stripped off.  */
-extern void deps_add_vpath (struct deps *, const char *);
+extern void deps_add_vpath (struct mkdeps *, const char *);
 
 /* Add a target (appears on left side of the colon) to the deps list.  Takes
    a boolean indicating whether to quote the target for MAKE.  */
-extern void deps_add_target (struct deps *, const char *, int);
+extern void deps_add_target (struct mkdeps *, const char *, int);
 
 /* Sets the default target if none has been given already.  An empty
    string as the default target is interpreted as stdin.  */
-extern void deps_add_default_target (struct deps *, const char *);
+extern void deps_add_default_target (struct mkdeps *, const char *);
 
 /* Add a dependency (appears on the right side of the colon) to the
    deps list.  Dependencies will be printed in the order that they
    were entered with this function.  By convention, the first
    dependency entered should be the primary source file.  */
-extern void deps_add_dep (struct deps *, const char *);
+extern void deps_add_dep (struct mkdeps *, const char *);
 
 /* Write out a deps buffer to a specified file.  The third argument
    is the number of columns to word-wrap at (0 means don't wrap).  */
-extern void deps_write (const struct deps *, FILE *, unsigned int);
+extern void deps_write (const struct mkdeps *, FILE *, unsigned int);
 
 /* Write out a deps buffer to a file, in a form that can be read back
    with deps_restore.  Returns nonzero on error, in which case the
    error number will be in errno.  */
-extern int deps_save (struct deps *, FILE *);
+extern int deps_save (struct mkdeps *, FILE *);
 
 /* Read back dependency information written with deps_save into
    the deps buffer.  The third argument may be NULL, in which case
    the dependency information is just skipped, or it may be a filename,
    in which case that filename is skipped.  */
-extern int deps_restore (struct deps *, FILE *, const char *);
+extern int deps_restore (struct mkdeps *, FILE *, const char *);
 
 /* For each dependency *except the first*, emit a dummy rule for that
    file, causing it to depend on nothing.  This is used to work around
    the intermediate-file deletion misfeature in Make, in some
    automatic dependency schemes.  */
-extern void deps_phony_targets (const struct deps *, FILE *);
+extern void deps_phony_targets (const struct mkdeps *, FILE *);
 
 #endif /* ! LIBCPP_MKDEPS_H */
index 77a2a3becb31fd33829af36ba161493bf11412f2..5b9c389bb493d55d07a765388a2739dcc80ab693 100644 (file)
@@ -512,7 +512,7 @@ struct cpp_reader
   cpp_token eof;
 
   /* Opaque handle to the dependencies of mkdeps.c.  */
-  struct deps *deps;
+  struct mkdeps *deps;
 
   /* Obstack holding all macro hash nodes.  This never shrinks.
      See identifiers.c */
index e506200627b0a22ad5f2c7038ca5e6f2987ab952..3cbd75640aa1747b5255ae62cc0c218c6a412ec5 100644 (file)
@@ -26,7 +26,7 @@ along with this program; see the file COPYING3.  If not see
 
 /* Keep this structure local to this file, so clients don't find it
    easy to start making assumptions.  */
-struct deps
+struct mkdeps
 {
   const char **targetv;
   unsigned int ntargets;       /* number of slots actually occupied */
@@ -122,7 +122,7 @@ munge (const char *filename)
 /* If T begins with any of the partial pathnames listed in d->vpathv,
    then advance T to point beyond that pathname.  */
 static const char *
-apply_vpath (struct deps *d, const char *t)
+apply_vpath (struct mkdeps *d, const char *t)
 {
   if (d->vpathv)
     {
@@ -163,14 +163,14 @@ apply_vpath (struct deps *d, const char *t)
 
 /* Public routines.  */
 
-struct deps *
+struct mkdeps *
 deps_init (void)
 {
-  return XCNEW (struct deps);
+  return XCNEW (struct mkdeps);
 }
 
 void
-deps_free (struct deps *d)
+deps_free (struct mkdeps *d)
 {
   unsigned int i;
 
@@ -202,7 +202,7 @@ deps_free (struct deps *d)
 /* Adds a target T.  We make a copy, so it need not be a permanent
    string.  QUOTE is true if the string should be quoted.  */
 void
-deps_add_target (struct deps *d, const char *t, int quote)
+deps_add_target (struct mkdeps *d, const char *t, int quote)
 {
   if (d->ntargets == d->targets_size)
     {
@@ -223,7 +223,7 @@ deps_add_target (struct deps *d, const char *t, int quote)
    string as the default target in interpreted as stdin.  The string
    is quoted for MAKE.  */
 void
-deps_add_default_target (struct deps *d, const char *tgt)
+deps_add_default_target (struct mkdeps *d, const char *tgt)
 {
   /* Only if we have no targets.  */
   if (d->ntargets)
@@ -253,7 +253,7 @@ deps_add_default_target (struct deps *d, const char *tgt)
 }
 
 void
-deps_add_dep (struct deps *d, const char *t)
+deps_add_dep (struct mkdeps *d, const char *t)
 {
   t = munge (apply_vpath (d, t));  /* Also makes permanent copy.  */
 
@@ -266,7 +266,7 @@ deps_add_dep (struct deps *d, const char *t)
 }
 
 void
-deps_add_vpath (struct deps *d, const char *vpath)
+deps_add_vpath (struct mkdeps *d, const char *vpath)
 {
   const char *elem, *p;
   char *copy;
@@ -295,7 +295,7 @@ deps_add_vpath (struct deps *d, const char *vpath)
 }
 
 void
-deps_write (const struct deps *d, FILE *fp, unsigned int colmax)
+deps_write (const struct mkdeps *d, FILE *fp, unsigned int colmax)
 {
   unsigned int size, i, column;
 
@@ -346,7 +346,7 @@ deps_write (const struct deps *d, FILE *fp, unsigned int colmax)
 }
 
 void
-deps_phony_targets (const struct deps *d, FILE *fp)
+deps_phony_targets (const struct mkdeps *d, FILE *fp)
 {
   unsigned int i;
 
@@ -364,7 +364,7 @@ deps_phony_targets (const struct deps *d, FILE *fp)
    error number will be in errno.  */
 
 int
-deps_save (struct deps *deps, FILE *f)
+deps_save (struct mkdeps *deps, FILE *f)
 {
   unsigned int i;
 
@@ -393,7 +393,7 @@ deps_save (struct deps *deps, FILE *f)
    in which case that filename is skipped.  */
 
 int
-deps_restore (struct deps *deps, FILE *fd, const char *self)
+deps_restore (struct mkdeps *deps, FILE *fd, const char *self)
 {
   unsigned int i, count;
   size_t num_to_read;
This page took 0.097327 seconds and 5 git commands to generate.