diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2003-06-18 12:57:43 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2003-06-18 12:57:43 +0000 |
commit | c332585b532ef1a520b001560e17be60f927e08d (patch) | |
tree | 92a83a9292c9ea3b8a8e235e830bf6581591579e /contrib/texinfo/info/info-utils.c | |
parent | 13885d9a55e35ee2b5730dd930f8ab8c7e481220 (diff) |
Import of stripped down GNU texinfo 4.6
Notes
Notes:
svn path=/vendor/texinfo/dist/; revision=116525
Diffstat (limited to 'contrib/texinfo/info/info-utils.c')
-rw-r--r-- | contrib/texinfo/info/info-utils.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/contrib/texinfo/info/info-utils.c b/contrib/texinfo/info/info-utils.c index 611ca15454fe..d018cbd17d45 100644 --- a/contrib/texinfo/info/info-utils.c +++ b/contrib/texinfo/info/info-utils.c @@ -1,7 +1,7 @@ /* info-utils.c -- miscellanous. - $Id: info-utils.c,v 1.1 2002/08/25 23:38:38 karl Exp $ + $Id: info-utils.c,v 1.2 2003/03/06 23:22:23 karl Exp $ - Copyright (C) 1993, 98 Free Software Foundation, Inc. + Copyright (C) 1993, 1998, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -355,6 +355,27 @@ info_concatenate_references (ref1, ref2) return (result); } + + +/* Copy a reference structure. Since we tend to free everything at + every opportunity, we don't share any points, but copy everything into + new memory. */ +REFERENCE * +info_copy_reference (src) + REFERENCE *src; +{ + REFERENCE *dest = xmalloc (sizeof (REFERENCE)); + dest->label = src->label ? xstrdup (src->label) : NULL; + dest->filename = src->filename ? xstrdup (src->filename) : NULL; + dest->nodename = src->nodename ? xstrdup (src->nodename) : NULL; + dest->start = src->start; + dest->end = src->end; + + return dest; +} + + + /* Free the data associated with REFERENCES. */ void info_free_references (references) |