aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-03-15 15:16:29 +0200
committerSergey Poznyakoff <gray@gnu.org>2018-03-15 15:16:29 +0200
commita6d33abe1d17ea1d004c645cc27120c92d7aa8e6 (patch)
treea752e9c99368d017c7da7ab8e731cfb706979068 /lib
parent58a8936d30bbb18b8ad93fecfe3fe2210d1c18b2 (diff)
downloadeclat-a6d33abe1d17ea1d004c645cc27120c92d7aa8e6.tar.gz
eclat-a6d33abe1d17ea1d004c645cc27120c92d7aa8e6.tar.bz2
Minor fixes
Diffstat (limited to 'lib')
-rw-r--r--lib/confirm.c3
-rw-r--r--lib/forlan.c6
-rw-r--r--lib/forlangrm.y4
-rw-r--r--lib/forlanlex.l1
-rw-r--r--lib/ldapmap.c3
5 files changed, 10 insertions, 7 deletions
diff --git a/lib/confirm.c b/lib/confirm.c
index ff60440..550a822 100644
--- a/lib/confirm.c
+++ b/lib/confirm.c
@@ -1,29 +1,30 @@
/* This file is part of Eclat.
- Copyright (C) 2012-2015 Sergey Poznyakoff.
+ Copyright (C) 2012-2018 Sergey Poznyakoff.
Eclat 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.
Eclat 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 Eclat. If not, see <http://www.gnu.org/licenses/>. */
#include "libeclat.h"
+#include <unistd.h>
#include <sysexits.h>
int
eclat_confirm(enum eclat_confirm_mode mode, const char *prompt, ...)
{
int rc;
va_list ap;
switch (mode) {
case eclat_confirm_unspecified:
case eclat_confirm_positive:
return 1;
diff --git a/lib/forlan.c b/lib/forlan.c
index 977271d..9fc80cb 100644
--- a/lib/forlan.c
+++ b/lib/forlan.c
@@ -1,14 +1,14 @@
/* This file is part of Eclat.
- Copyright (C) 2012-2015 Sergey Poznyakoff.
+ Copyright (C) 2012-2018 Sergey Poznyakoff.
Eclat 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.
Eclat 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
@@ -970,28 +970,28 @@ func_sort(forlan_eval_env_t env, struct grecs_list *list)
{
struct forlan_value *val = list->head->data;
struct forlan_value *t;
struct grecs_list_entry *ep;
if (!val->v.node)
return;
forlan_sort_key = NULL;
forlan_compar = forlan_compar_string;
forlan_sort_reverse = 0;
- if (ep = list->head->next) {
+ if ((ep = list->head->next)) {
t = ep->data;
forlan_sort_key = t->v.string;
- if (ep = ep->next) {
+ if ((ep = ep->next)) {
char *p;
t = ep->data;
for (p = t->v.string; *p; p++) {
switch (*p) {
case 'n':
forlan_compar = forlan_compar_numeric;
break;
case 'i':
forlan_compar = forlan_compar_string_ci;
break;
case 't':
diff --git a/lib/forlangrm.y b/lib/forlangrm.y
index 2db1274..9d44ec9 100644
--- a/lib/forlangrm.y
+++ b/lib/forlangrm.y
@@ -14,25 +14,25 @@
You should have received a copy of the GNU General Public License
along with Eclat. If not, see <http://www.gnu.org/licenses/>. */
#include "libeclat.h"
#include <grecs.h>
#include <grecs/locus.h>
#include "forlangrm.h"
#include "forlan.h"
#include <string.h>
int yylex();
-static int yyerror(char *);
+static int yyerror(char const *);
union forlan_node *forlan_parse_tree;
size_t forlan_variable_count;
static struct grecs_symtab *forlan_symtab;
static size_t find_variable(const char *name);
static union forlan_node *create_comp_node(union forlan_node *root,
struct grecs_list *arglist,
int wildcards);
struct path_component {
char *id;
char *label;
@@ -362,25 +362,25 @@ stmt_ctrl : BREAK ';'
}
;
stmt_asgn : IDENT '=' node ';'
{
$$ = forlan_node_create(forlan_type_asgn);
$$->asgn.idx = find_variable($1);
$$->asgn.node = $3;
}
;
%%
static int
-yyerror(char *s)
+yyerror(char const *s)
{
grecs_error(&yylloc, 0, "%s", s);
return 0;
}
int
forlan_parser()
{
yydebug = debug_level(forlan_dbg) >= FORLAN_DBG_GRAM;
return yyparse();
}
diff --git a/lib/forlanlex.l b/lib/forlanlex.l
index 62265cb..0fc469e 100644
--- a/lib/forlanlex.l
+++ b/lib/forlanlex.l
@@ -47,24 +47,25 @@ static size_t forlan_input_pos;
if (YYSTATE == 0) { \
yylloc.beg = grecs_current_locus_point; \
yylloc.beg.col++; \
} \
grecs_current_locus_point.col += yyleng; \
yylloc.end = grecs_current_locus_point; \
} while (0);
static int yywrap(void);
%}
+%option noinput
%option nounput
WS [ \t\f][ \t\f]*
ID [a-zA-Z_][a-zA-Z_0-9-]*
%x COMMENT ML STR
%%
/* Comments */
"/*" BEGIN(COMMENT);
<COMMENT>[^*\n]* /* eat anything that's not a '*' */
<COMMENT>"*"+[^*/\n]* /* eat up '*'s not followed by '/'s */
<COMMENT>\n grecs_locus_point_advance_line(grecs_current_locus_point);
<COMMENT>"*"+"/" BEGIN(INITIAL);
diff --git a/lib/ldapmap.c b/lib/ldapmap.c
index 61cdf87..09b0689 100644
--- a/lib/ldapmap.c
+++ b/lib/ldapmap.c
@@ -1,35 +1,36 @@
/* This file is part of Eclat.
- Copyright (C) 2012-2015 Sergey Poznyakoff.
+ Copyright (C) 2012-2018 Sergey Poznyakoff.
Eclat 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.
Eclat 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 Eclat. If not, see <http://www.gnu.org/licenses/>. */
#include "libeclat.h"
#include "wordsplit.h"
#include <ldap.h>
#include <errno.h>
#include <sysexits.h>
#include <signal.h>
#include <pwd.h>
+#include <unistd.h>
enum { tls_no, tls_yes, tls_only };
struct ldap_map {
unsigned long ldap_version;
char *uri;
char *base;
char *binddn;
char *bindpw;
char *passfile;
int tls;
int prompt;

Return to:

Send suggestions and report system problems to the System administrator.