diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2000-02-09 01:27:25 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2000-02-09 01:27:25 +0000 |
commit | 328f35a635ee7b14c4d6f2dbddacba138e62219b (patch) | |
tree | 5f0effaeb304116c7826d814dfa001d501a3b10a /gnu/usr.bin/texinfo/lib/substring.c | |
parent | c2daa957909e4243f84a2232ff4a481b6c44a393 (diff) |
TexInfo 4.0. New manpages, can create html.
A bit more grumpy about bad texinfo, though.
Diffstat (limited to 'gnu/usr.bin/texinfo/lib/substring.c')
-rw-r--r-- | gnu/usr.bin/texinfo/lib/substring.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/usr.bin/texinfo/lib/substring.c b/gnu/usr.bin/texinfo/lib/substring.c new file mode 100644 index 00000000000..64772334de5 --- /dev/null +++ b/gnu/usr.bin/texinfo/lib/substring.c @@ -0,0 +1,37 @@ +/* substring.c -- extract substring. + $Id: substring.c,v 1.1.1.1 2000/02/09 01:24:23 espie Exp $ + + Copyright (C) 1999 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include "system.h" + +char * +substring (start, end) + char *start; + char *end; +{ + char *result = xmalloc (end - start + 1); + char *scan_result = result; + char *scan = start; + + while (scan < end) + *scan_result++ = *scan++; + + *scan_result = 0; + return result; +} + |