mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Switch to limits.h; replace MAXPATHLEN and MAXHOSTNAMELEN with PATH_MAX
and HOST_NAME_MAX+1, respectively. ok doug@
This commit is contained in:
parent
c412f040df
commit
7936b9b2a7
3
calmwm.c
3
calmwm.c
@ -18,13 +18,14 @@
|
||||
* $OpenBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/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>
|
||||
|
4
calmwm.h
4
calmwm.h
@ -260,7 +260,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);
|
||||
|
||||
@ -292,7 +292,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];
|
||||
|
3
client.c
3
client.c
@ -18,12 +18,13 @@
|
||||
* $OpenBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/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
3
conf.c
@ -18,12 +18,13 @@
|
||||
* $OpenBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
3
group.c
3
group.c
@ -19,12 +19,13 @@
|
||||
* $OpenBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
9
kbfunc.c
9
kbfunc.c
@ -18,12 +18,13 @@
|
||||
* $OpenBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/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
3
menu.c
@ -19,12 +19,13 @@
|
||||
* $OpenBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -19,11 +19,12 @@
|
||||
* $OpenBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
2
parse.y
2
parse.y
@ -21,7 +21,7 @@
|
||||
|
||||
%{
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
#include <ctype.h>
|
||||
|
3
screen.c
3
screen.c
@ -18,11 +18,12 @@
|
||||
* $OpenBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
5
search.c
5
search.c
@ -18,7 +18,7 @@
|
||||
* $OpenBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/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
3
util.c
@ -18,11 +18,12 @@
|
||||
* $OpenBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -24,11 +24,12 @@
|
||||
* management of the xevent's.
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -18,11 +18,12 @@
|
||||
* $OpenBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
Loading…
Reference in New Issue
Block a user