~emersion/mrsh

b5f59283c9e7b8b161feeaa9c085668a9490dc83 — Simon Ser 25 days ago d93eed8
Drop mrsh_limit.h

We don't rely on PATH_MAX anymore.

Closes: https://github.com/emersion/mrsh/issues/167
5 files changed, 0 insertions(+), 14 deletions(-)

M builtin/cd.c
M frontend/readline.c
D include/mrsh_limit.h
M shell/entry.c
M shell/path.c
M builtin/cd.c => builtin/cd.c +0 -1
@@ 8,7 8,6 @@
#include <unistd.h>
#include "builtin.h"
#include "mrsh_getopt.h"
#include "mrsh_limit.h"
#include "shell/path.h"

static const char cd_usage[] = "usage: cd [-L|-P] [-|directory]\n";

M frontend/readline.c => frontend/readline.c +0 -1
@@ 15,7 15,6 @@
#include <histedit.h>
#endif
#include "frontend.h"
#include "mrsh_limit.h"

#if defined(HAVE_READLINE)
#if !defined(HAVE_READLINE_REPLACE_LINE)

D include/mrsh_limit.h => include/mrsh_limit.h +0 -10
@@ 1,10 0,0 @@
#ifndef MRSH_LIMIT_H
#define MRSH_LIMIT_H

#include <limits.h>

#ifndef PATH_MAX
#define PATH_MAX 4096
#endif

#endif

M shell/entry.c => shell/entry.c +0 -1
@@ 11,7 11,6 @@
#include "parser.h"
#include "shell/path.h"
#include "shell/trap.h"
#include "mrsh_limit.h"

static char *expand_str(struct mrsh_state *state, const char *src) {
	struct mrsh_parser *parser = mrsh_parser_with_data(src, strlen(src));

M shell/path.c => shell/path.c +0 -1
@@ 8,7 8,6 @@
#include <stdlib.h>
#include <unistd.h>
#include "shell/path.h"
#include "mrsh_limit.h"

char *expand_path(struct mrsh_state *state, const char *file, bool exec,
		bool default_path) {