Compare commits
No commits in common. "master" and "v1.3.3" have entirely different histories.
@ -1,6 +1,6 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_INIT([libsexpr],[m4_esyscmd(tr -d '\n' < VERSION)])
|
AC_INIT(libsexpr, m4_esyscmd([tr -d '\n' < VERSION]))
|
||||||
|
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
@ -30,9 +30,8 @@ AS_IF([test "x$enable_faststack_alloc" = "xyes"], [
|
|||||||
AC_DEFINE([USE_FASTSTACK_ALLOC], 1, [using faststack allocation within parser])
|
AC_DEFINE([USE_FASTSTACK_ALLOC], 1, [using faststack allocation within parser])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_OUTPUT([
|
||||||
Makefile
|
Makefile
|
||||||
lib/libsexpr.pc
|
lib/libsexpr.pc
|
||||||
lib/Makefile
|
lib/Makefile
|
||||||
include/Makefile])
|
include/Makefile])
|
||||||
AC_OUTPUT
|
|
||||||
|
1
debian/.gitignore
vendored
1
debian/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
.debhelper
|
|
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,10 +1,3 @@
|
|||||||
libsexpr (1.3.3) stable; urgency=medium
|
|
||||||
|
|
||||||
* Release 1.3.3 More helper functions to easy works on a simple S expressions
|
|
||||||
* Updates to the new and uptodate libraries
|
|
||||||
|
|
||||||
-- Alexander Vdolainen <alex@vapaa.xyz> Mon, 3 Jun 2019 23:34:56 +0100
|
|
||||||
|
|
||||||
libsexpr (1.3.1) stable; urgency=medium
|
libsexpr (1.3.1) stable; urgency=medium
|
||||||
|
|
||||||
* Release 1.3.1 Added helper functions to operate with S-expressions
|
* Release 1.3.1 Added helper functions to operate with S-expressions
|
||||||
|
35
debian/copyright
vendored
35
debian/copyright
vendored
@ -1,26 +1,20 @@
|
|||||||
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
Upstream-Name: libsexpr
|
Upstream-Name: libsexpr
|
||||||
Source: <https://vapaa.work/public/libsexpr>
|
Source: <url://example.com>
|
||||||
|
|
||||||
Files: *
|
Files: *
|
||||||
Copyright: 2003 - 2006 Matthew Sottile <mjsottile@gmail.com>
|
Copyright: <years> <put author's name and email here>
|
||||||
2010 - 2014 Alexander Vdolainen <alex@vapaa.xyz>
|
<years> <likewise for another author>
|
||||||
License: LGPL-2
|
License: <special license>
|
||||||
Additionally, this library is free software; you can redistribute it and/or
|
<Put the license of the package here indented by 1 space>
|
||||||
modify it under the terms of the GNU Lesser General Public License as
|
<This follows the format of Description: lines in control file>
|
||||||
published by the Free Software Foundation; either version 2.1 of the
|
.
|
||||||
License, or (at your option) any later version.
|
<Including paragraphs>
|
||||||
|
|
||||||
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, U SA
|
|
||||||
|
|
||||||
|
# If you want to use GPL v2 or later for the /debian/* files use
|
||||||
|
# the following clauses, or change it to suit. Delete these two lines
|
||||||
Files: debian/*
|
Files: debian/*
|
||||||
Copyright: 2014, 2025 Alexander Vdolainen <alex@vapaa.xyz>
|
Copyright: 2014 Alexander Vdolainen <vdo@daze>
|
||||||
License: GPL-2+
|
License: GPL-2+
|
||||||
This package is free software; you can redistribute it and/or modify
|
This package is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -37,3 +31,8 @@ License: GPL-2+
|
|||||||
.
|
.
|
||||||
On Debian systems, the complete text of the GNU General
|
On Debian systems, the complete text of the GNU General
|
||||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
||||||
|
|
||||||
|
# Please also look if there are files or directories which have a
|
||||||
|
# different copyright/license attached and list them here.
|
||||||
|
# Please avoid to pick license terms that are more restrictive than the
|
||||||
|
# packaged work, as it may make Debian's contributions unacceptable upstream.
|
||||||
|
@ -97,17 +97,6 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
CSTRING *sadd(CSTRING *s, char *a);
|
CSTRING *sadd(CSTRING *s, char *a);
|
||||||
|
|
||||||
/**
|
|
||||||
* Concatenate the len bytes of the second argument to the CSTRING
|
|
||||||
* passed in the first.
|
|
||||||
* A NULL return value indicates that something went wrong and that
|
|
||||||
* sexp_errno should be checked for the cause. The contents of s are
|
|
||||||
* left alone. As such, the caller should check the pointer returned
|
|
||||||
* before overwriting the value of s, as this may result in a memory
|
|
||||||
* leak if an error condition occurs.
|
|
||||||
*/
|
|
||||||
CSTRING *snadd(CSTRING *s, char *a, size_t len);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append a character to the end of the CSTRING.
|
* Append a character to the end of the CSTRING.
|
||||||
* A NULL return value indicates that something went wrong and that
|
* A NULL return value indicates that something went wrong and that
|
||||||
|
@ -86,18 +86,7 @@ CSTRING *snew(size_t s) {
|
|||||||
return cs;
|
return cs;
|
||||||
}
|
}
|
||||||
|
|
||||||
CSTRING *sadd(CSTRING *s, char *a)
|
CSTRING *sadd(CSTRING *s, char *a) {
|
||||||
{
|
|
||||||
size_t len = strlen(a);
|
|
||||||
|
|
||||||
if(!s) return NULL;
|
|
||||||
if(!a || !len) return s;
|
|
||||||
|
|
||||||
return snadd(s, a, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
CSTRING *snadd(CSTRING *s, char *a, size_t len)
|
|
||||||
{
|
|
||||||
size_t alen;
|
size_t alen;
|
||||||
char *newbase;
|
char *newbase;
|
||||||
|
|
||||||
@ -111,7 +100,7 @@ CSTRING *snadd(CSTRING *s, char *a, size_t len)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
alen = len;
|
alen = strlen(a);
|
||||||
|
|
||||||
if (s->curlen + alen >= s->len) {
|
if (s->curlen + alen >= s->len) {
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@ -136,10 +125,9 @@ CSTRING *snadd(CSTRING *s, char *a, size_t len)
|
|||||||
s->base = newbase;
|
s->base = newbase;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&s->base[s->curlen], a, alen);
|
memcpy(&s->base[s->curlen],a,alen);
|
||||||
s->curlen += alen;
|
s->curlen += alen;
|
||||||
s->base[s->curlen] = 0;
|
s->base[s->curlen] = 0;
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user