| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (struct lino_state): New mode flag,
selinclusive.
(lino_set_selinclusive, lino_get_selinclusive): New functions.
(sync_data_to_buf): Adjust rightmost endpoint when
selection is reversed and inclusive mode is in effect,
so that the included character will be visually highlighted.
(yank_sel, delete_sel): Adjust endpoint of selection
if in in inclusive mode.
* linenoise/linenoise.h (lino_set_selinclusive,
lino_get_selinclusive): Declared.
|
|
|
|
|
| |
* txr.c (help): Note the existence of --args and --eargs,
without giving a full description.
|
|
|
|
| |
* txr.1: maybe -> may be.
|
|
|
|
|
|
| |
* txr.1: Just list directives that take Lisp;
drop the details. Point out that no @ is needed
for access to Lisp variable.
|
|
|
|
|
| |
* txr.1: @ is not required on Lisp
variables.
|
|
|
|
| |
* txr.1: Mistake in syntax markup.
|
|
|
|
|
|
| |
* eval.c (eval_init): Use sys_load_s variable
set up earlier in the function instead of redundant call to
intern.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (self_load_path_s): New symbol variable.
(sys_load): Save, set-up and restore self-load-path
around load.
(set_get_symacro): New function.
(eval_init): Register load function using sys_load_s instead
of redundant intern.
* eval.h (set_get_symacro): Declared.
* match.c (v_load): Save, set-up and restore self-load-path
macro.
* parser.c (load_rcfile): Likewise.
* txr.c (txr_main: Set up self-load-path when opening
file.
* txr.1: Documented self-load-path.
|
|
|
|
|
|
|
| |
* txr.1: In Interactive Listener sections, note what
"character under the cursor" means when a vertical cursor
is in effect, and add notes about how the selection semantics
pairs well with that style of cursor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sysif.c (at_exit_list): New static variable.
(at_exit_call, at_exit_do_not_call): New functions.
(at_exit_handler): New static function.
(sysif_init): GC-protect at_exit_list.
Register at_exit_handler with C atexit function.
Register intrinsic functions at-exit-call and
at-exit-do-not-call.
* sysif.h (at_exit_call, at_exit_do_not_call): Registered.
* txr.1: Documented.
|
|
|
|
|
|
| |
* lib.c (length_list): Count using cnum
only up to INT_PTR_MAX, then switch to
bignums.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (termios.o): New object file.
* lib.c (init): Call termios_init.
* lisplib.c (termios_set_entries, termios_instantiate): New
functions.
(lisplib_init): Register new functions in autoload table.
* share/txr/stdlib/termios.tl: New file.
* termios.c, termios.h: New files.
* txr.1: Documented termios.
|
|
|
|
|
|
|
|
|
|
|
| |
* checkman.txr: Check against blank line after .desc.
Fix incorrect pattern, failing to match one-symbol
Function/Operator/Macro headings. This exposes
errors in the document that were previously undetected.
* txr.1: Fix numerous occurrences of blank lines
after .desc, missing .desc, incorrect headings
and other problems.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (rcyc_pop): Just assume that *plist points to a cons
and access the fields directly.
(rcyc_cons): Don't bother with rplacd.
(rcyc_list): Don't bother with set macro.
* regex.c (read_until_match): Defensive coding: locally
ensure that rcyc_pop won't be called on a nil stack,
which will now segfault.
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (cons): When we recycle a cons, it could
be already in the mature generation. In that case,
baby objects stored in its car or cdr violate the
integrity of the heap. We must hint about this
to the garbage collector. Test case:
./txr --gc-debug -p "(list* 'foo (zip
'(a) (repeat '((gensym)))))"
|
|
|
|
|
| |
* gc.c (gc_set): Should say "promote obj to gen 1",
not "to gen 0".
|
|
|
|
|
|
|
|
|
| |
* struct.c (static_slot_ensure): In the case when we grow the
array of static slots, we were allowing chk_manage_vec to
initialize the newly added element. This is wrong, because
it is just a plain assignment, which causes a mature object
to point to a baby object. This bug caused static slots to
contain junk.
|
|
|
|
|
|
|
| |
* struct.c (lookup_slot_load, lookup_static_slot_load): New
functions.
(slot, static_slot): Use auto-load wrappers for lower-level
slot lookup functions.
|
|
|
|
|
|
|
|
|
| |
Improper handling of arguments in certain cases.
Test case: [[flipargs -] 2 1]. Should yield -1;
actual behavior is error.
* lib.c (minusv, divv): Correct test for more
arguments after extracting the leftmost one.
|
|
|
|
|
|
|
|
| |
* stream.c (record_adapter): Use default_bool_arg
rather than tnil. Since rb->include_match ends up passed
directly to read_until_match, which deals with argument
defaulting, we could just store the argument value into the
structure.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
| |
* lib.h (default_arg): Inline function becomes macro,
so we can avoid evaluating the default value expression
when it is not needed.
* lib.c (default_arg): Declaration removed.
|
|
|
|
|
|
|
|
|
| |
* stream.c (flush_stream): Default the argument to
std_output.
(stream_init): Register flush-stream as having one
optional arg.
* txr.1: Updated flush-stream description.
|
|
|
|
|
|
| |
* genvim.txr: Let's not get rid of this just from
the instructions comment, but from the internals.
txl-* replaced with tl-*.
|
|
|
|
|
|
| |
* genvim.txr: "INSTALL-HOWTO" comment still talks about
.txl files, an experimental suffix we didn't go with.
Now fixed to .tl.
|
|
|
|
|
| |
* stream.c (string_in_get_prop): Do not format stream address
into name; the general stream_print_op already adds that.
|
|
|
|
|
|
|
| |
* txr.c (txr_main): Register *args-full* variable
before first branch to repl. In repl section,
register or re-register *args* to any remaining
args, and self-path to the string "listener".
|
|
|
|
|
|
| |
* sysif.c (drop_privilege): If bailing due to a privilege
management problem, use panic with a descriptive message
instead of a plain abort.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (panic_s): New symbol variable.
(obj_init): Initialize panic_s.
* lib.h (panic_s): Declared.
* unwind.c (uw_init): Register panic exception.
* unwind.h (panic): New macro.
|
|
|
|
|
| |
* jmp.S: Don't generate the .note.GNU-stack section
on MinGW or Cygwin either.
|
|
|
|
|
| |
jmp.S: check for __CYGWIN__ rather than __CYGWIN32__
for defining the DEFUN macro.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When subprocesses are created using open-command,
open-process, run or sh, any streams not bound by
those functions are obtained from *stdin*, *stdout*
or *stderr*, as appropriate. Thus manipulating these
variables has the effect of redirecting not only
local output within the program but over coprocesses
as well.
* stream.c (struct save_fds): New type.
(FDS_IN, FDS_OUT, FDS_ERR): New macros.
(fds_init, fds_subst, fds_swizzle, fds_restore): New static
functions.
(open_command, open_process, run): "Swizzle" and restore
the standard file descriptors.
* txr.1: Updated documentation of affected function.
|
|
|
|
|
|
| |
Makefile (lex.yy.c): Crudely and shamelessly filter lex.yy.c
through sed to remove // commments, even if // occurs in a
string literal or a /*...*/ comment which ends on that line.
|
|
|
|
|
| |
txr.c (help): 2015 was so last year. Let's make it
a range from 2009 to current.
|
|
|
|
|
| |
txr.c (help): Remove blank line between name and copyright
line.
|
|
|
|
| |
txr.c (help): "sare" -> "are".
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This helps with setuid hash bang scripting on Mac OS,
and other plaforms where the interpreter executed out
of a hash bang script runs with orinary privilege,
even if marked setuid.
* sysif.c (exec_wrap): Static function turns extern.
* sysif.h (exec-wrap): Declared.
* txr.1: Documented --reexec. Added notes about setuid under
Hash Bang Support.
* txr.c (help): List --reexec option.
(txr_main): Implement --reexec option.
|
|
|
|
|
|
|
| |
* configure (lang_flags): The declaration of setgroups
requires the __EXTENSIONS__ macro. If the test fails, let's
repeat it with that macro and if it succeeds, add that to
lang_flags.
|
|
|
|
|
|
|
|
| |
* genvim.txr (txr_splicevar): This match must be contained.
(txr_metanum): Must be contained in TXR, need not be contained
in TXR Lisp.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
| |
* txr.c (oom_realloc_handler): When terminating, only print
the word false if the print-bindings option -B is in effect.
Also, print it to standard output, not standard error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (path_test_set_entries): New elements in the list
for path-readable-to-me-p, path-read-writable-to-me-p, and
path-strictly-private-to-me-p.
* share/txr/stdlib/path-test.pl (sys:path-access): Test
bitwise combinations of permissions, so read+write
can be tested in one call.
(path-readable-to-me-p, path-read-writable-to-me-p,
path-strictly-private-to-me-p): New functions.
* txr.1: Documented.
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/path-test.tl (sys:path-access): Comment
added to note use restriction to identical permissions for
all three scopes. Fixed incorrect use of logior instead
of logand which causes strict permission test to be applied
to user even when testing for non-execute permisisons.
|
|
|
|
|
|
|
|
|
|
|
| |
If txr is renamed to something else in the same installation
directory, we can still calculate the sysroot.
* txr.c (substitute_basename): New function.
(sysroot_init): Make one more attempt to calculate the
sysroot by substituting the actual base name of
the program into the compile-time relative path, and
using that path agains the full path name.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (sysroot_path): New static variable.
(progpath): Variable renamed to prog_path.
(sysroot_helper): Function removed.
(maybe_sysroot): New function.
(sysroot): Function now just catenates previously
calculated sysroot path onto target without.
(sysroot_init): Follow rename of progpath to prog_path.
GC-protect sysroot_path. Calculate sysroot path; if not
able, emit warning message and use empty string.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TXR now notices that it's running setgid, and
implements setgid logic for scripts.
* sysif.c (orig_egid, real_gid, is_setgid): New static
variables.
(repress_privilege): Treat real and effective
group ID similarly to user ID. Save them in global
variables, and set the is_setgid flag.
(drop_privilege): Drop setgid privilege similarly
to setuid. Operate selectively: if neither setuid
nor setgid is in effect, do nothing, but if just
one is in effect, don't do anything for the other.
(simulate_setuid): Function renamed to simulate_setuid_setgid.
A small change is made here: if the fstat fails, just drop
privilege, don't abort. Implement setgid operation
independently of setuid. The is_setgid and is_setuid
flags are manipulated here now to get the drop_privileges
function to selectively drop setuid if we are running
a script which is only segid, or drop setgid if we are running
a setuid only script.
* sysif.h (simulate_setuid): Declaration name change to
simulate_setuid_setgid.
* txr.c (txr_main): Follow rename of simulate_setuid.
* txr.1: SETUID OPERATION section changed to SETUID/SETGID
operation, and setgid description worked into the text.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sysif.c (repress_privilege): Eliminate redundant
getuid call.
(drop_privilege): On some platforms,
setuid(getuid()) will not drop setuid non-root privilege. This
is fixed by using setresuid, if we have it, which we do on
Linux. On platforms where we don't have setresuid,
we try setuid(getuid()). Then after that if we are able
to change our effective user ID to the one we dropped,
we conclude that it didn't work and abort.
(simulate_setuid): Call drop_privilege instead of
repeating the naive privilege-dropping logic.
Check the result of seteuid; if it fails, then
drop privilege! Otherwise a txr that is setuid bob
will continue running as bob, if it fails to enact
setuid on a script owned by alice.
* txr.1: Rewrite SETUID OPERATION section in an attempt
to clarify the wording, fix formatting issues, and
describe the current implemenation of privilege dropping.
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: Test for these functions.
* sysif.c (getresuid_wrap, getresgid_wrap, setresuid_wrap,
setresgid_wrap): New static function.
(sysif_init): Registered getresuid, setresgid, setresuid and
setresgid intrinsics.
* txr.1: Documented all four functions.
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: Test for setgroups. New HAVE_SETGROUPS
preprocessor symbol for config/config.h.
* sysif.c (setgroups_wrap): New static function.
(sysif_init): Register intrinsic setgroups function.
* txr.1: Documented setgroups. Rearranged sections
so getgroups and setgroups descriptions are consecutive.
|
|
|
|
|
|
| |
* configure (lang_flags): -D_GNU_SOURCE added.
* ftw.c (__USE_GNU): Macro definition removed.
|