aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-06-25 17:28:26 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-06-25 17:28:26 +0300
commit42acf86a105cbbd1df123acb07309b27211bbf67 (patch)
treea4ef3550243d306ed4ad7b5038e098cd3f38429b
parente2f87cfb91d9c2a03c1b30cf9e33273e547e2eb4 (diff)
downloadwordsplit-1.0.tar.gz
wordsplit-1.0.tar.bz2
Get rid of the grecs dependenciesv1.0
-rw-r--r--wordsplit.at10
-rw-r--r--wsp.c18
2 files changed, 14 insertions, 14 deletions
diff --git a/wordsplit.at b/wordsplit.at
index 7ecc016..13f2f84 100644
--- a/wordsplit.at
+++ b/wordsplit.at
@@ -1,18 +1,18 @@
-# This file is part of grecs -*- Autotest -*-
-# Copyright (C) 2014-2018 Sergey Poznyakoff
+# Test suite for wordsplit -*- Autotest -*-
+# Copyright (C) 2014-2019 Sergey Poznyakoff
#
-# Grecs is free software; you can redistribute it and/or modify
+# Wordsplit 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 3, or (at your option)
# any later version.
#
-# Grecs is distributed in the hope that it will be useful,
+# Wordsplit 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 Grecs. If not, see <http://www.gnu.org/licenses/>.
+# along with wordsplit. If not, see <http://www.gnu.org/licenses/>.
AT_BANNER(Wordsplit)
diff --git a/wsp.c b/wsp.c
index 958d01f..6f8cdc7 100644
--- a/wsp.c
+++ b/wsp.c
@@ -1,18 +1,18 @@
-/* grecs - Gray's Extensible Configuration System
+/* wsp - test program for wordsplit
Copyright (C) 2014-2019 Sergey Poznyakoff
- Grecs is free software; you can redistribute it and/or modify it
+ Wordsplit 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 3 of the License, or (at your
option) any later version.
- Grecs is distributed in the hope that it will be useful,
+ Wordsplit 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 Grecs. If not, see <http://www.gnu.org/licenses/>. */
+ with wordsplit. If not, see <http://www.gnu.org/licenses/>. */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -22,7 +22,6 @@
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include "grecs.h"
#include "wordsplit.h"
extern char **environ;
@@ -592,6 +591,7 @@ wsp_runcmd (char **ret, const char *str, size_t len, char **argv, void *closure)
{
int i;
size_t s = 0;
+ char const msg[] = "unknown command: ";
for (i = 0; ; i++)
{
@@ -601,11 +601,11 @@ wsp_runcmd (char **ret, const char *str, size_t len, char **argv, void *closure)
return comtab[i].cmd (ret, str, len, argv);
}
- *ret = NULL;
- if (grecs_asprintf (ret, &s, "unknown command: %s", argv[0]))
+ *ret = malloc (sizeof (msg) + strlen (argv[0]));
+ if (!*ret)
return WRDSE_NOSPACE;
- else
- return WRDSE_USERERR;
+ strcat (strcpy (*ret, msg), argv[0]);
+ return WRDSE_USERERR;
}
int

Return to:

Send suggestions and report system problems to the System administrator.