Skip to content

Commit

Permalink
Tidy up some includes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicm committed Oct 20, 2014
1 parent 30bacf6 commit 900f6fc
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 15 deletions.
1 change: 1 addition & 0 deletions arguments.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <sys/types.h>

#include <getopt.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
Expand Down
1 change: 1 addition & 0 deletions client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions cmd-confirm-before.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion cmd-list-keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions job.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <fcntl.h>
#include <paths.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
Expand Down
6 changes: 3 additions & 3 deletions screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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("");

Expand Down
2 changes: 1 addition & 1 deletion server-fn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 2 additions & 0 deletions style.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 4 additions & 3 deletions tmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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;

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
5 changes: 1 addition & 4 deletions tmux.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,15 @@

#define PROTOCOL_VERSION 8

#include <sys/param.h>
#include <sys/time.h>
#include <sys/queue.h>
#include <sys/tree.h>
#include <sys/uio.h>

#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>
Expand Down Expand Up @@ -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 *);
Expand Down
4 changes: 1 addition & 3 deletions xmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 900f6fc

Please sign in to comment.