cvsimport

This commit is contained in:
Christian Neukirchen 2015-01-22 11:06:01 +01:00
commit 742732a1c8
15 changed files with 44 additions and 26 deletions

View File

@ -18,13 +18,14 @@
* $OpenBSD$
*/
#include <sys/param.h>
#include <sys/types.h>
#include "queue.h"
#include <sys/wait.h>
#include <err.h>
#include <errno.h>
#include <getopt.h>
#include <limits.h>
#include <locale.h>
#include <pwd.h>
#include <signal.h>

View File

@ -279,7 +279,7 @@ TAILQ_HEAD(mousebinding_q, binding);
struct cmd {
TAILQ_ENTRY(cmd) entry;
char *name;
char path[MAXPATHLEN];
char path[PATH_MAX];
};
TAILQ_HEAD(cmd_q, cmd);
@ -311,7 +311,7 @@ struct conf {
int snapdist;
struct gap gap;
char *color[CWM_COLOR_NITEMS];
char known_hosts[MAXPATHLEN];
char known_hosts[PATH_MAX];
#define CONF_FONT "sans-serif:pixelsize=14:bold"
char *font;
Cursor cursor[CF_NITEMS];

View File

@ -18,12 +18,13 @@
* $OpenBSD$
*/
#include <sys/param.h>
#include <sys/types.h>
#include "queue.h"
#include <assert.h>
#include <err.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

3
conf.c
View File

@ -18,12 +18,13 @@
* $OpenBSD$
*/
#include <sys/param.h>
#include <sys/types.h>
#include "queue.h"
#include <sys/stat.h>
#include <err.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -19,12 +19,13 @@
* $OpenBSD$
*/
#include <sys/param.h>
#include <sys/types.h>
#include "queue.h"
#include <assert.h>
#include <err.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -18,12 +18,13 @@
* $OpenBSD$
*/
#include <sys/param.h>
#include <sys/types.h>
#include "queue.h"
#include <dirent.h>
#include <err.h>
#include <errno.h>
#include <limits.h>
#include <paths.h>
#include <signal.h>
#include <stdio.h>
@ -238,7 +239,7 @@ kbfunc_exec(struct client_ctx *cc, union arg *arg)
#define NPATHS 256
struct screen_ctx *sc = cc->sc;
char **ap, *paths[NPATHS], *path, *pathcpy;
char tpath[MAXPATHLEN];
char tpath[PATH_MAX];
const char *label;
DIR *dirp;
struct dirent *dp;
@ -323,8 +324,8 @@ kbfunc_ssh(struct client_ctx *cc, union arg *arg)
struct menu_q menuq;
FILE *fp;
char *buf, *lbuf, *p;
char hostbuf[MAXHOSTNAMELEN];
char path[MAXPATHLEN];
char hostbuf[HOST_NAME_MAX+1];
char path[PATH_MAX];
int l;
size_t len;

3
menu.c
View File

@ -19,12 +19,13 @@
* $OpenBSD$
*/
#include <sys/param.h>
#include <sys/types.h>
#include "queue.h"
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -19,11 +19,12 @@
* $OpenBSD$
*/
#include <sys/param.h>
#include <sys/types.h>
#include "queue.h"
#include <err.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

19
parse.y
View File

@ -21,7 +21,7 @@
%{
#include <sys/param.h>
#include <sys/types.h>
#include <sys/queue.h>
#include <ctype.h>
@ -49,7 +49,9 @@ struct file *pushfile(const char *);
int popfile(void);
int yyparse(void);
int yylex(void);
int yyerror(const char *, ...);
int yyerror(const char *, ...)
__attribute__((__format__ (printf, 1, 2)))
__attribute__((__nonnull__ (1)));
int kw_cmp(const void *, const void *);
int lookup(char *);
int lgetc(int);
@ -119,21 +121,21 @@ main : FONTNAME STRING {
}
| BORDERWIDTH NUMBER {
if ($2 < 0 || $2 > UINT_MAX) {
yyerror("invalid borderwidth: %d", $2);
yyerror("invalid borderwidth: %lld", $2);
YYERROR;
}
conf->bwidth = $2;
}
| MOVEAMOUNT NUMBER {
if ($2 < 0 || $2 > INT_MAX) {
yyerror("invalid movemount: %d", $2);
yyerror("invalid movemount: %lld", $2);
YYERROR;
}
conf->mamount = $2;
}
| SNAPDIST NUMBER {
if ($2 < 0 || $2 > INT_MAX) {
yyerror("invalid snapdist: %d", $2);
yyerror("invalid snapdist: %lld", $2);
YYERROR;
}
conf->snapdist = $2;
@ -151,7 +153,7 @@ main : FONTNAME STRING {
| AUTOGROUP NUMBER STRING {
if ($2 < 0 || $2 > 9) {
free($3);
yyerror("invalid autogroup: %d", $2);
yyerror("invalid autogroup: %lld", $2);
YYERROR;
}
conf_autogroup(conf, $2, $3);
@ -176,7 +178,7 @@ main : FONTNAME STRING {
$3 < 0 || $3 > INT_MAX ||
$4 < 0 || $4 > INT_MAX ||
$5 < 0 || $5 > INT_MAX) {
yyerror("invalid gap: %d %d %d %d",
yyerror("invalid gap: %lld %lld %lld %lld",
$2, $3, $4, $5);
YYERROR;
}
@ -438,6 +440,9 @@ yylex(void)
} else if (c == quotec) {
*p = '\0';
break;
} else if (c == '\0') {
yyerror("syntax error");
return (findeol());
}
if (p + 1 >= buf + sizeof(buf) - 1) {
yyerror("string too long");

View File

@ -18,11 +18,12 @@
* $OpenBSD$
*/
#include <sys/param.h>
#include <sys/types.h>
#include "queue.h"
#include <err.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -18,7 +18,7 @@
* $OpenBSD$
*/
#include <sys/param.h>
#include <sys/types.h>
#include "queue.h"
#include <assert.h>
@ -26,6 +26,7 @@
#include <errno.h>
#include <fnmatch.h>
#include <glob.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -172,7 +173,7 @@ search_print_client(struct menu *mi, int list)
static void
search_match_path(struct menu_q *menuq, struct menu_q *resultq, char *search, int flag)
{
char pattern[MAXPATHLEN];
char pattern[PATH_MAX];
glob_t g;
int i;

3
util.c
View File

@ -18,11 +18,12 @@
* $OpenBSD$
*/
#include <sys/param.h>
#include <sys/types.h>
#include "queue.h"
#include <err.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -24,11 +24,12 @@
* management of the xevent's.
*/
#include <sys/param.h>
#include <sys/types.h>
#include "queue.h"
#include <err.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -18,11 +18,12 @@
* $OpenBSD$
*/
#include <sys/param.h>
#include <sys/types.h>
#include "queue.h"
#include <err.h>
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>

View File

@ -18,11 +18,12 @@
* $OpenBSD$
*/
#include <sys/param.h>
#include <sys/types.h>
#include "queue.h"
#include <err.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>