libdash 0.5.0__tar.gz → 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {libdash-0.5.0/libdash.egg-info → libdash-0.5.2}/PKG-INFO +1 -1
- {libdash-0.5.0 → libdash-0.5.2}/libdash/_dash.py +13 -8
- {libdash-0.5.0 → libdash-0.5.2}/libdash/parser.py +15 -15
- {libdash-0.5.0 → libdash-0.5.2/libdash.egg-info}/PKG-INFO +1 -1
- {libdash-0.5.0 → libdash-0.5.2}/pyproject.toml +1 -1
- {libdash-0.5.0 → libdash-0.5.2}/setup.py +2 -10
- {libdash-0.5.0 → libdash-0.5.2}/COPYING +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/MANIFEST.in +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/Makefile.am +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/README.md +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/autogen.sh +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/configure.ac +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/libdash/__init__.py +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/libdash/ast.py +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/libdash/printer.py +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/libdash.egg-info/SOURCES.txt +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/libdash.egg-info/dependency_links.txt +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/libdash.egg-info/top_level.txt +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/setup.cfg +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/Makefile.am +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/TOUR +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/alias.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/alias.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/arith_yacc.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/arith_yacc.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/arith_yylex.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/bltin/bltin.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/bltin/echo.1 +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/bltin/printf.1 +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/bltin/printf.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/bltin/test.1 +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/bltin/test.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/bltin/times.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/builtins.def.in +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/cd.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/cd.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/dash.1 +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/error.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/error.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/eval.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/eval.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/exec.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/exec.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/expand.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/expand.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/funcs/cmv +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/funcs/dirs +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/funcs/kill +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/funcs/login +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/funcs/newgrp +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/funcs/popd +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/funcs/pushd +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/funcs/suspend +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/histedit.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/init.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/input.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/input.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/jobs.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/jobs.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/machdep.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/mail.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/mail.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/main.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/main.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/memalloc.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/memalloc.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/miscbltin.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/miscbltin.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/mkbuiltins +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/mkinit.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/mknodes.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/mksignames.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/mksyntax.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/mktokens +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/myhistedit.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/mystring.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/mystring.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/nodes.c.pat +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/nodetypes +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/options.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/options.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/output.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/output.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/parser.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/parser.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/redir.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/redir.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/shell.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/show.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/show.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/system.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/system.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/trap.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/trap.h +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/var.c +0 -0
- {libdash-0.5.0 → libdash-0.5.2}/src/var.h +0 -0
|
@@ -223,8 +223,8 @@ class strpush (Structure):
|
|
|
223
223
|
# struct alias *ap; /* if push was associated with an alias */
|
|
224
224
|
# char *string; /* remember the string since it may change */
|
|
225
225
|
#
|
|
226
|
-
# /*
|
|
227
|
-
#
|
|
226
|
+
# /* Delay freeing so we can stop nested aliases. */
|
|
227
|
+
# struct strpush *spfree;
|
|
228
228
|
#
|
|
229
229
|
# /* Number of outstanding calls to pungetc. */
|
|
230
230
|
# int unget;
|
|
@@ -234,7 +234,7 @@ strpush._fields_ = [("prev", POINTER (strpush)),
|
|
|
234
234
|
("prevnleft", c_int),
|
|
235
235
|
("ap", c_void_p),
|
|
236
236
|
("string", c_char_p),
|
|
237
|
-
("
|
|
237
|
+
("spfree", POINTER (strpush)),
|
|
238
238
|
("unget", c_int)];
|
|
239
239
|
|
|
240
240
|
class parsefile (Structure):
|
|
@@ -245,14 +245,18 @@ class parsefile (Structure):
|
|
|
245
245
|
# int linno; /* current line */
|
|
246
246
|
# int fd; /* file descriptor (or -1 if string) */
|
|
247
247
|
# int nleft; /* number of chars left in this line */
|
|
248
|
-
# int
|
|
248
|
+
# int eof; /* do not read again once we hit EOF */
|
|
249
249
|
# char *nextc; /* next char in buffer */
|
|
250
250
|
# char *buf; /* input buffer */
|
|
251
251
|
# struct strpush *strpush; /* for pushing strings at this level */
|
|
252
252
|
# struct strpush basestrpush; /* so pushing one is fast */
|
|
253
253
|
#
|
|
254
|
-
# /*
|
|
255
|
-
#
|
|
254
|
+
# /* Delay freeing so we can stop nested aliases. */
|
|
255
|
+
# struct strpush *spfree;
|
|
256
|
+
#
|
|
257
|
+
# #ifndef SMALL
|
|
258
|
+
# int lleft; /* number of chars left in this buffer */
|
|
259
|
+
# #endif
|
|
256
260
|
#
|
|
257
261
|
# /* Number of outstanding calls to pungetc. */
|
|
258
262
|
# int unget;
|
|
@@ -261,12 +265,13 @@ parsefile._fields_ = [("prev", POINTER (parsefile)),
|
|
|
261
265
|
("linno", c_int),
|
|
262
266
|
("fd", c_int),
|
|
263
267
|
("nleft", c_int),
|
|
264
|
-
("
|
|
268
|
+
("eof", c_int),
|
|
265
269
|
("nextc", POINTER (c_char)), # NOT c_char_p!
|
|
266
270
|
("buf", c_char_p),
|
|
267
271
|
("strpush", POINTER (strpush)),
|
|
268
272
|
("basestrpush", strpush),
|
|
269
|
-
("
|
|
273
|
+
("spfree", POINTER (strpush)),
|
|
274
|
+
("lleft", c_int),
|
|
270
275
|
("unget", c_int)];
|
|
271
276
|
|
|
272
277
|
|
|
@@ -16,7 +16,8 @@ def libdash_library_path():
|
|
|
16
16
|
LIBDASH_LIBRARY_PATH = os.path.join(FILE_PATH, "libdash.so")
|
|
17
17
|
return LIBDASH_LIBRARY_PATH
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
# parsefile->eof bit 1: set by preadbuffer at EOF, never cleared by pungetc.
|
|
20
|
+
PARSEFILE_EOF = 2;
|
|
20
21
|
|
|
21
22
|
class ParsingException(Exception):
|
|
22
23
|
def __init__(self, message='ParseError'):
|
|
@@ -64,7 +65,7 @@ def parse(inputPath, init=True):
|
|
|
64
65
|
n_ptr_C = parsecmd_safe (libdash, False)
|
|
65
66
|
|
|
66
67
|
linno_after = parsefile_var.contents.linno - 1; # libdash is 1-indexed
|
|
67
|
-
|
|
68
|
+
eof_after = parsefile_var.contents.eof
|
|
68
69
|
|
|
69
70
|
if (n_ptr_C == None): # Dash.Null
|
|
70
71
|
pass
|
|
@@ -73,19 +74,18 @@ def parse(inputPath, init=True):
|
|
|
73
74
|
elif (n_ptr_C == NERR): # Dash.Error
|
|
74
75
|
raise ParsingException()
|
|
75
76
|
else:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
##
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
linno_after = linno_after + 1; # The last line wasn't counted
|
|
77
|
+
## dash bumps `linno` on newline, so an unterminated last line is
|
|
78
|
+
## never counted. Only adjust at EOF; otherwise every node would
|
|
79
|
+
## swallow the next one's first line.
|
|
80
|
+
if (eof_after & PARSEFILE_EOF):
|
|
81
|
+
if (inputPath == "-"):
|
|
82
|
+
## no lines to check against; trust the flag
|
|
83
|
+
linno_after = linno_after + 1
|
|
84
|
+
elif (lines and (lines [-1][-1:] != '\n')):
|
|
85
|
+
linno_after = len (lines)
|
|
86
|
+
|
|
87
|
+
if (inputPath != "-"):
|
|
88
|
+
linno_after = min (linno_after, len (lines))
|
|
89
89
|
|
|
90
90
|
n_ptr = cast (n_ptr_C, POINTER (union_node))
|
|
91
91
|
new_ast = of_node (n_ptr)
|
|
@@ -22,8 +22,6 @@ class libdash_build_py(build_py):
|
|
|
22
22
|
build_py.run(self)
|
|
23
23
|
|
|
24
24
|
if sys.platform == 'darwin':
|
|
25
|
-
libtoolize = "glibtoolize"
|
|
26
|
-
|
|
27
25
|
target_arch = os.environ.get("ARCHFLAGS")
|
|
28
26
|
build_arch = platform.machine()
|
|
29
27
|
if not target_arch:
|
|
@@ -38,19 +36,13 @@ class libdash_build_py(build_py):
|
|
|
38
36
|
os.environ["LDFLAGS"] = f'{os.environ.get("LDFLAGS", "")} {target_arch}'.strip()
|
|
39
37
|
|
|
40
38
|
print(f'ARCHFLAGS: {target_arch} MACOSX_DEPLOYMENT_TARGET: {os.environ.get("MACOSX_DEPLOYMENT_TARGET", "")} CFLAGS: {os.environ.get("CFLAGS")} LDFLAGS: {os.environ.get("LDFLAGS")}')
|
|
41
|
-
else:
|
|
42
|
-
libtoolize = "libtoolize"
|
|
43
39
|
|
|
44
40
|
# cibuildwheel builds every wheel in the same source tree; objects
|
|
45
41
|
# left over from a previous build may target a different arch
|
|
46
42
|
if os.path.exists('Makefile'):
|
|
47
43
|
subprocess.run(['make', 'distclean'])
|
|
48
44
|
|
|
49
|
-
try_exec(
|
|
50
|
-
try_exec('aclocal')
|
|
51
|
-
try_exec('autoheader')
|
|
52
|
-
try_exec('automake', '--add-missing')
|
|
53
|
-
try_exec('autoconf')
|
|
45
|
+
try_exec('autoreconf', '--install', '--force')
|
|
54
46
|
try_exec('./configure')
|
|
55
47
|
try_exec('make')
|
|
56
48
|
|
|
@@ -61,7 +53,7 @@ class libdash_build_py(build_py):
|
|
|
61
53
|
setup(name='libdash',
|
|
62
54
|
packages=['libdash'],
|
|
63
55
|
cmdclass={'build_py': libdash_build_py},
|
|
64
|
-
version='0.5.
|
|
56
|
+
version='0.5.2',
|
|
65
57
|
long_description=long_description,
|
|
66
58
|
long_description_content_type='text/markdown',
|
|
67
59
|
include_package_data=True,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|