Deleted Added
full compact
rcsfile.c (184054) rcsfile.c (185094)
1/*-
2 * Copyright (c) 2007-2008, Ulf Lilleengen <lulf@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2007-2008, Ulf Lilleengen <lulf@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: projects/csup_cvsmode/contrib/csup/rcsfile.c 184054 2008-10-19 09:08:59Z lulf $
26 * $FreeBSD: projects/csup_cvsmode/contrib/csup/rcsfile.c 185094 2008-11-19 14:57:00Z lulf $
27 */
28
29#include <assert.h>
30#include <stdio.h>
31#include <stdlib.h>
32#include <string.h>
33#include <err.h>
34#include <errno.h>

--- 668 unchanged lines hidden (view full) ---

703 printf("Text:\n");
704 in = stream_open_buf(d->text);
705 line = stream_getln(in, NULL);
706 while (line != NULL) {
707 lprintf(1, "TEXT: %s\n", line);
708 line = stream_getln(in, NULL);
709 }
710 stream_close(in);
27 */
28
29#include <assert.h>
30#include <stdio.h>
31#include <stdlib.h>
32#include <string.h>
33#include <err.h>
34#include <errno.h>

--- 668 unchanged lines hidden (view full) ---

703 printf("Text:\n");
704 in = stream_open_buf(d->text);
705 line = stream_getln(in, NULL);
706 while (line != NULL) {
707 lprintf(1, "TEXT: %s\n", line);
708 line = stream_getln(in, NULL);
709 }
710 stream_close(in);
711 printf("branches: ");
712 printf("\n");
713 }
714
715 if (rf->desc != NULL)
716 printf("desc: '%s'\n", rf->desc);
717}
718
719/* Free all memory associated with a struct rcsfile. */

--- 36 unchanged lines hidden (view full) ---

756 }
757
758 if (rf->comment != NULL)
759 free(rf->comment);
760
761 /* Free all deltas in global list */
762 while (!LIST_EMPTY(&rf->deltatable)) {
763 d = LIST_FIRST(&rf->deltatable);
711 printf("\n");
712 }
713
714 if (rf->desc != NULL)
715 printf("desc: '%s'\n", rf->desc);
716}
717
718/* Free all memory associated with a struct rcsfile. */

--- 36 unchanged lines hidden (view full) ---

755 }
756
757 if (rf->comment != NULL)
758 free(rf->comment);
759
760 /* Free all deltas in global list */
761 while (!LIST_EMPTY(&rf->deltatable)) {
762 d = LIST_FIRST(&rf->deltatable);
763 LIST_REMOVE(d, delta_next);
764 LIST_REMOVE(d, table_next);
765 rcsfile_freedelta(d);
766 }
767
768 /* Free global branch. */
769 if (rf->trunk->revnum != NULL)
770 free(rf->trunk->revnum);
771 free(rf->trunk);

--- 610 unchanged lines hidden ---
764 LIST_REMOVE(d, table_next);
765 rcsfile_freedelta(d);
766 }
767
768 /* Free global branch. */
769 if (rf->trunk->revnum != NULL)
770 free(rf->trunk->revnum);
771 free(rf->trunk);

--- 610 unchanged lines hidden ---