mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-07 16:54:01 +01:00
Tidy up some includes.
This commit is contained in:
parent
30bacf6f30
commit
900f6fc17e
@ -18,6 +18,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <getopt.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
1
client.c
1
client.c
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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
1
job.c
@ -21,6 +21,7 @@
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <paths.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
6
screen.c
6
screen.c
@ -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("");
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
2
signal.c
2
signal.c
@ -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>
|
||||
|
||||
|
2
style.c
2
style.c
@ -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
7
tmux.c
@ -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
5
tmux.h
@ -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 *);
|
||||
|
Loading…
Reference in New Issue
Block a user