Tidy up some includes.

pull/1/head
nicm 2014-10-20 23:27:14 +00:00
parent 30bacf6f30
commit 900f6fc17e
12 changed files with 20 additions and 15 deletions

View File

@ -18,6 +18,7 @@
#include <sys/types.h>
#include <getopt.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

View File

@ -26,6 +26,7 @@
#include <errno.h>
#include <event.h>
#include <fcntl.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

View File

@ -16,6 +16,8 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/types.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>

View File

@ -165,7 +165,7 @@ enum cmd_retval
cmd_list_keys_commands(unused struct cmd *self, struct cmd_q *cmdq)
{
const struct cmd_entry **entryp;
struct cmd_entry *entry;
const struct cmd_entry *entry;
for (entryp = cmd_table; *entryp != NULL; entryp++) {
entry = *entryp;

1
job.c
View File

@ -21,6 +21,7 @@
#include <fcntl.h>
#include <paths.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

View File

@ -31,12 +31,12 @@ void screen_resize_y(struct screen *, u_int);
void
screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
{
char hn[MAXHOSTNAMELEN];
char host[HOST_NAME_MAX];
s->grid = grid_create(sx, sy, hlimit);
if (gethostname(hn, MAXHOSTNAMELEN) == 0)
s->title = xstrdup(hn);
if (gethostname(host, HOST_NAME_MAX) == 0)
s->title = xstrdup(host);
else
s->title = xstrdup("");

View File

@ -31,7 +31,7 @@ void server_callback_identify(int, short, void *);
void
server_fill_environ(struct session *s, struct environ *env)
{
char var[MAXPATHLEN], *term;
char var[PATH_MAX], *term;
u_int idx;
long pid;

View File

@ -17,6 +17,8 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/types.h>
#include <string.h>
#include <signal.h>

View File

@ -17,6 +17,8 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/types.h>
#include <string.h>
#include "tmux.h"

7
tmux.c
View File

@ -22,6 +22,7 @@
#include <errno.h>
#include <event.h>
#include <fcntl.h>
#include <getopt.h>
#include <locale.h>
#include <paths.h>
#include <pwd.h>
@ -46,7 +47,7 @@ char *cfg_file;
char *shell_cmd;
int debug_level;
time_t start_time;
char socket_path[MAXPATHLEN];
char socket_path[PATH_MAX];
int login_shell;
char *environ_path;
@ -124,7 +125,7 @@ areshell(const char *shell)
char *
makesocketpath(const char *label)
{
char base[MAXPATHLEN], realbase[MAXPATHLEN], *path, *s;
char base[PATH_MAX], realbase[PATH_MAX], *path, *s;
struct stat sb;
u_int uid;
@ -202,7 +203,7 @@ int
main(int argc, char **argv)
{
struct passwd *pw;
char *s, *path, *label, **var, tmp[MAXPATHLEN];
char *s, *path, *label, **var, tmp[PATH_MAX];
char in[256];
const char *home;
long long pid;

5
tmux.h
View File

@ -21,7 +21,6 @@
#define PROTOCOL_VERSION 8
#include <sys/param.h>
#include <sys/time.h>
#include <sys/queue.h>
#include <sys/tree.h>
@ -29,10 +28,8 @@
#include <bitstring.h>
#include <event.h>
#include <getopt.h>
#include <imsg.h>
#include <limits.h>
#include <signal.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
@ -1565,7 +1562,7 @@ extern char *cfg_file;
extern char *shell_cmd;
extern int debug_level;
extern time_t start_time;
extern char socket_path[MAXPATHLEN];
extern char socket_path[PATH_MAX];
extern int login_shell;
extern char *environ_path;
void logfile(const char *);

View File

@ -16,10 +16,8 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/param.h>
#include <sys/types.h>
#include <errno.h>
#include <libgen.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>