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.47
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 : f90.sl
% -*- mode: slang; mode: fold -*- % Free/Fixed format source F90 mode custom_variable ("F90_Continue_Char", "&"); custom_variable ("F90_Comment_String", "!"); custom_variable ("F90_Indent_Amount", 2); custom_variable ("F90_Default_Format", "free"); % or "fixed" private define get_format_mode () { if (blocal_var_exists ("F90_Mode_Format")) return get_blocal_var ("F90_Mode_Format"); return 0; } private define set_format_mode (x) { create_blocal_var ("F90_Mode_Format"); set_blocal_var (strlow(x) == "free", "F90_Mode_Format"); } private variable Zero_Indent_Words = ["PROGRAM"]; private variable Block_Indent_Keywords = [ "ASSOCIATE", "CASE", "CONTAINS", "DO", "ELSE", "FORALL", "IF", "SELECT", "TYPE", "WHERE", "ElSEIF", "ELSEWHERE", "INTERFACE", "FUNCTION", "SUBROUTINE", "MODULE", Zero_Indent_Words, ]; private define goto_end_of_code_line () { eol (); while (not bolp ()) { bskip_white (); if (0 == parse_to_point ()) break; go_left (1); } } private define bskip_non_code () { while (not bobp()) { bskip_white (); if (bolp ()) { go_up (1); continue; } variable p = parse_to_point (); if (p) { if ((p != -2) || (0 == bfind ("!"))) go_left (1); continue; } push_mark (); bol (); if (looking_at ("#")) { pop_mark_0 (); continue; } pop_mark_1 (); return; } } private define line_continues () { push_spot (); goto_end_of_code_line (); variable c = blooking_at ("&"); pop_spot (); return c; } private define line_was_continued () { push_spot (); bol (); bskip_non_code (); variable c = blooking_at ("&"); pop_spot (); return c; } % If looking at one of the words, return 1 otherwise 0. % If wordp reference is non-NULL, set it to word. % The words array is assumed to be uppercase private define looking_at_word (words, wordp) { push_spot (); push_mark (); skip_chars ("A-Za-z0-9_"); variable word = strup (bufsubstr ()); pop_spot (); if (wordp != NULL) @wordp = word; return any (words == word); } private define blooking_at_words (words, wordp) { push_spot (); push_mark (); bskip_chars ("A-Za-z0-9_"); variable word = strup (bufsubstr ()); pop_spot (); if (wordp != NULL) @wordp = word; return any (words == word); } private define bskip_to_bos () { bskip_non_code (); while (line_was_continued () && up_1()) ; bol_skip_white (); } %{{{ Free Format Functions private define line_contains_word (f) { push_spot (); EXIT_BLOCK { pop_spot(); } return (ffind (f) && (re_looking_at (strcat ("\\C", f, "[\t ]+[A-Za-z_]"))) && (0 == parse_to_point ())); } % This function does not preserve the point private define compute_free_f90_indent (); % recursive private define compute_free_f90_indent () { variable start_pos = create_user_mark (); variable goal = 0; % 0 signifies not set bol_skip_white (); if (looking_at_word (Zero_Indent_Words, NULL)) return 1; if (looking_at ("!")) { push_spot (); if (up_1 ()) { bol_skip_white (); if (looking_at ("!")) { goal = what_column (); pop_spot (); return goal; } } pop_spot (); } variable is_paren = looking_at (")") || looking_at ("]") || looking_at ("/)"); if (1 == find_matching_delimiter (')')) { goal = what_column () + (is_paren == 0); % If the match is at the end of the line, reset the indent point % This should be made configurable. This idea is to avoid excess % whitespace %go_right_1 (); skip_white (); skip_chars ("(/ \t"); ifnot (looking_at ("&")) { goto_user_mark (start_pos); return goal; } goal = 0; } goto_user_mark (start_pos); variable bol_word; while (up_1 ()) { bskip_non_code (); variable eol_word; () = blooking_at_words ("", &eol_word); variable will_continue = line_continues (); variable was_continued = line_was_continued (); if (will_continue == 0) { was_continued = 0; bskip_to_bos (); } if (will_continue && (goal == 0)) { go_left_1(); bskip_white (); if (blooking_at (")")) { was_continued = 0; bskip_to_bos (); } } bol_skip_white (); % Check for the presence of labels ifnot (was_continued) { variable p = _get_point (); skip_chars (" \t0-9"); if (p != _get_point ()) { push_spot (); goal = compute_free_f90_indent (); pop_spot (); } } if (goal == 0) goal = what_column (); if (eol_word == "THEN") { ifnot (was_continued) goal += F90_Indent_Amount; break; } % Check for the presence of labels % ifnot (was_continued) % skip_chars (" \t0-9");% numeric label push_mark (); skip_chars ("A-Za-z0-9_ \t"); if (looking_at (":") && not looking_at ("::")) { skip_chars (": \t"); pop_mark_0(); } else pop_mark_1(); ifnot (looking_at_word (Block_Indent_Keywords, &bol_word)) { variable is_func = 0; if (bol_word != "END") foreach (["FUNCTION", "SUBROUTINE"]) { variable f = (); if (line_contains_word (f)) { is_func = 1; break; } } % pop_spot (); if (is_func == 0) { if (was_continued) goal -= F90_Indent_Amount; if (will_continue) goal += F90_Indent_Amount; break; } } goal += F90_Indent_Amount; switch (bol_word) { case "IF": if ((will_continue == 0) && (eol_word != "THEN")) goal -= F90_Indent_Amount; } { case "TYPE": if (will_continue == 0) { go_right(4); skip_white (); if (looking_at_char ('(')) { ifnot (line_contains_word ("FUNCTION") || (line_contains_word ("SUBROUTINE"))) goal -= F90_Indent_Amount; } } } { case "MODULE": if (will_continue == 0) { go_right(6); skip_white (); if (looking_at ("PROCEDURE")) goal -= F90_Indent_Amount; } } { case "WHERE": if (will_continue == 0) { goal -= F90_Indent_Amount; go_right (5); skip_white (); if (looking_at ("(") && (1 == find_matching_delimiter ('('))) { go_right (1); skip_white (); if (looking_at ("!") || eolp ()) goal += F90_Indent_Amount; } } else goal += F90_Indent_Amount; } { if (will_continue) goal += F90_Indent_Amount; } break; } % now check current line variable curr_word; goto_user_mark (start_pos); bol (); skip_chars ("0-9 \t"); if (looking_at_word (["CASE", "ELSE", "ELSEWHERE", "ELSEIF", "CONTAINS"], &curr_word)) { goal -= F90_Indent_Amount; if ((curr_word == "CASE") && (bol_word == "SELECT")) { goal += F90_Indent_Amount; } } else if (0 == strncmp (curr_word, "END", 3)) { go_right (3); skip_white (); if (looking_at_word (Zero_Indent_Words, NULL)) return 1; if (looking_at_word (Block_Indent_Keywords, &curr_word)) { goal -= F90_Indent_Amount; if ((curr_word == "SELECT") && (bol_word != "SELECT")) { goal -= F90_Indent_Amount; } } } return goal; } private define free_f90_indent () { variable cs = CASE_SEARCH; CASE_SEARCH = 0; EXIT_BLOCK { CASE_SEARCH = cs; } variable start_pos = create_user_mark (); variable goal = compute_free_f90_indent (); bol_skip_white (); variable col = what_column (); skip_chars ("0-9"); variable label_end_col = 0; if (col != what_column()) { ifnot (line_was_continued ()) { if (col != 2) { bol_trim (); insert_single_space (); } skip_chars ("0-9"); label_end_col = what_column(); ifnot (looking_at (" ")) insert_single_space (); skip_white (); } else bol_skip_white (); } col = what_column (); if (goal != col) { bskip_white (); if (label_end_col) { goal -= label_end_col; if (goal < 1) goal = 1; goal++; } if ((label_end_col == 0) || (goal > 1)) { col = what_column (); skip_white (); if (goal - 1 != what_column() - col) { bskip_white (); trim (); insert_spaces (goal-1); } } } eol (); if (_get_point() > 132) vmessage ("Line %d contains more than 132 bytes", what_line()); goto_user_mark (start_pos); bskip_white (); if (bolp()) { skip_white (); return; } goto_user_mark (start_pos); } private define free_f90_is_comment () { bol (); looking_at("!"); } private define old_free_f90_newline () { variable p, cont , cont1; if (bolp ()) { newline (); return; } free_f90_indent (); push_spot (); bskip_white (); trim (); if (what_column () > 72) { push_spot (); bol_skip_white(); ifnot (bolp()) message ("Line exceeds 72 columns."); pop_spot (); } p = _get_point (); bskip_chars("-+*=/,(&<>"); cont = (p != _get_point ()); cont1 = cont; if ( cont ) { if ( looking_at( "&" ) ) { cont1 = 0; } } if (free_f90_is_comment ()) cont = 0; bol_skip_white (); if (looking_at("data ")) cont = 0; pop_spot (); if (cont1) { insert( " " ); insert(F90_Continue_Char); } newline (); if ( cont ) { insert(F90_Continue_Char); insert( " " ); } insert_single_space (); free_f90_indent (); } private define free_f90_newline () { bskip_white (); if (0 == parse_to_point ()) { variable m = create_user_mark(); bskip_chars("-+*=/,(<>:"); variable needs_continued = (m != create_user_mark ()); ifnot (needs_continued) needs_continued = (1 == find_matching_delimiter (')')); goto_user_mark (m); if (needs_continued && not blooking_at ("&")) insert (" &"); } trim (); if (what_column () > 72) message ("Line exceeds 72 columns."); newline (); free_f90_indent (); } %}}} %{{{ Fixed Format Functions define fixed_f90_indent () { variable goal = 7; % at top of buffer it should be 7 n'est pas? variable cs = CASE_SEARCH; variable ch; % goto beginning of line and skip past continuation char USER_BLOCK0 { bol (); skip_chars ("0-9 \t"); if (looking_at(F90_Continue_Char)) go_right_1 (); skip_white (); } push_spot (); push_spot (); CASE_SEARCH = 0; % F90 is not case sensitive while (up_1 ()) { bol_skip_white(); if (eolp() || looking_at(F90_Continue_Char)) continue; X_USER_BLOCK0 (); goal = what_column (); if (goal == 1) continue; if (looking_at("do ") || looking_at("else") || looking_at("subroutine") || looking_at("interface") || looking_at("program") ) goal += F90_Indent_Amount; else if (looking_at("if ") || looking_at("if(")) { if (ffind ("then")) goal += F90_Indent_Amount; } else if (looking_at("type ") || looking_at("module ")) { if (not (ffind ("::"))) goal += F90_Indent_Amount; } break; } % now check current line pop_spot (); push_spot (); X_USER_BLOCK0 (); if (looking_at("end") or looking_at("continue") or looking_at("else")) goal -= F90_Indent_Amount; CASE_SEARCH = cs; % done getting indent if (goal < 7) goal = 7; pop_spot (); bol_skip_white (); % after the label or continuation char and indent the rest to goal USER_BLOCK1 { skip_chars ("0-9"); trim (); if (looking_at (F90_Continue_Char)) { insert_spaces (6 - what_column()); go_right_1 (); trim(); goal += F90_Indent_Amount; } insert_spaces (goal - what_column()); } ch = char(what_char()); switch (ch) { isdigit (ch) : % label if (what_column () >= 6) { bol (); trim (); insert_single_space (); } X_USER_BLOCK1 (); } { case F90_Continue_Char : % continuation character bol (); trim (); insert (" "); X_USER_BLOCK1 (); } { not (bolp()) || eolp (): % general case bol (); trim (); goal--; insert_spaces (goal); } pop_spot (); skip_white (); } define fixed_f90_is_comment () { bol (); skip_chars (" \t0-9"); bolp () and not (eolp()); } define fixed_f90_newline () { variable p, cont; if (bolp ()) { newline (); return; } fixed_f90_indent (); push_spot (); bskip_white (); trim (); if (what_column () > 72) { push_spot (); bol_skip_white(); ifnot (bolp()) message ("Line exceeds 72 columns."); pop_spot (); } p = _get_point (); bskip_chars("-+*=/,("); cont = (p != _get_point ()); if (fixed_f90_is_comment ()) cont = 0; bol_skip_white (); if (looking_at("data ")) cont = 0; pop_spot (); newline (); insert_single_space (); if (cont) insert(F90_Continue_Char); fixed_f90_indent (); } %}}} private define dispatch_f90_function (free, fixed) { if (get_format_mode ()) { (@free) (); return; } (@fixed) (); } define f90_indent () { dispatch_f90_function (&free_f90_indent, &fixed_f90_indent); } define f90_is_comment () { dispatch_f90_function (&free_f90_is_comment, &fixed_f90_is_comment); } define f90_newline () { dispatch_f90_function (&free_f90_newline, &fixed_f90_newline); } define f90_continue_newline () { f90_newline (); push_spot (); bol_skip_white (); if (looking_at(F90_Continue_Char)) pop_spot (); else { insert (F90_Continue_Char); pop_spot (); f90_indent (); go_right_1 (); skip_white (); } } % % electric labels % define f90_electric_label () { insert_char (LAST_CHAR); if (get_format_mode ()) return; % free-format push_spot (); if (f90_is_comment ()) pop_spot (); else { bol_skip_white (); skip_chars ("0-9"); trim (); pop_spot (); f90_indent (); } } % f90 comment/uncomment functions define f90_uncomment () { push_spot (); if (f90_is_comment ()) { bol (); if (looking_at (F90_Comment_String)) deln (strlen (F90_Comment_String)); else del (); } f90_indent (); pop_spot (); go_down_1 (); } define f90_comment () { ifnot (f90_is_comment ()) { push_spot (); bol (); insert (F90_Comment_String); } pop_spot (); go_down_1 (); } % % Look for beginning of current subroutine/function % define f90_beg_of_subprogram () { variable cs = CASE_SEARCH; CASE_SEARCH = 0; do { bol_skip_white (); if (_get_point ()) { if (looking_at ("program") || looking_at ("function") || looking_at ("subroutine")) break; } } while (up_1 ()); CASE_SEARCH = cs; } % % Look for end of current subroutine/function % define f90_end_of_subprogram () { variable cs = CASE_SEARCH; CASE_SEARCH = 0; do { bol_skip_white (); if (looking_at ("end")) { go_right (3); skip_white (); if (eolp ()) break; } } while (down_1 ()); CASE_SEARCH = cs; } define f90_mark_subprogram () { f90_end_of_subprogram (); go_down_1 (); push_mark (); call ("set_mark_cmd"); f90_beg_of_subprogram (); bol (); } % % shows a ruler for F90 source. Press any key to get rid of % define f90_ruler () { variable c = what_column (); variable r = window_line (); bol (); push_mark (); insert (" 5 7 10 15 20 25 30 35 40 45 50 55 60 65 70\n"); insert ("{ }|{ | | | | | | | | | | | | | }\n"); goto_column (c); if (r <= 2) r = 3; recenter (r); message ("Press SPACE to get rid of the ruler."); update_sans_update_hook (1); () = getkey (); bol (); del_region (); goto_column (c); flush_input (); recenter (r); } private define f90_prev_next_statement (dirfun) { while (@dirfun ()) { bol (); skip_chars ("^0-9 \t\n"); ifnot (_get_point ()) break; } variable col = 7; if (get_format_mode ()) col = 1; () = goto_column_best_try (col); } % % moves cursor to the next statement, skipping comment lines % define f90_next_statement () { f90_prev_next_statement (&down_1); } % % moves cursor to the previous f90 statement, skipping comments % define f90_previous_statement () { f90_prev_next_statement (&up_1); } % % main entry point into the f90 mode % $1 = "F90"; ifnot (keymap_p ($1)) make_keymap ($1); definekey ("f90_comment", "\e;", $1); definekey ("f90_uncomment", "\e:", $1); definekey ("f90_continue_newline", "\e\r", $1); definekey ("self_insert_cmd", "'", $1); definekey ("self_insert_cmd", "\"", $1); definekey ("f90_beg_of_subprogram", "\e^A", $1); definekey ("f90_end_of_subprogram", "\e^E", $1); definekey ("f90_mark_function", "\e^H", $1); definekey_reserved ("f90_next_statement", "^N", $1); definekey_reserved ("f90_previous_statement", "^P", $1); definekey_reserved ("f90_ruler", "^R", $1); _for (0, 9, 1) { $2 = (); definekey ("f90_electric_label", string($2), $1); } % Set up syntax table foreach (["F90_free", "F90_fixed"]) { $1 = (); create_syntax_table ($1); define_syntax ("!", "", '%', $1); define_syntax ("([", ")]", '(', $1); define_syntax ('"', '"', $1); define_syntax ('\'', '"', $1); % quoted strings %define_syntax ('\'', '"', $1); % quoted characters % define_syntax ('\\', '\\', $1); define_syntax ("0-9a-zA-Z_", 'w', $1); % words define_syntax ("-+0-9eEdD", '0', $1); % Numbers define_syntax (",.", ',', $1); define_syntax ('#', '#', $1); define_syntax ("-+/*=", '+', $1); % F77 keywords + include, record, structure, while: % backspace block % call character common complex continue % data dimension do double % else end enddo endfile endif entry equivalence exit external % format function % goto % if implicit include inquire integer intrinsic % logical % parameter pause precision program % real return rewind % save stop subroutine % then % while % % Extensions for Fortran 90: % allocatable % allocate % case % contains % cycle % deallocate % elsewhere % endblockdata % endfunction % endinterface % endmodule % endprogram % endselect % endsubroutine % endtype % endwhere % intent % interface % kind % module % moduleprocedure % namelist % nullify % optional % pointer % private % public % recursive % select % selectcase % sequence % target % type % use % where % () = define_keywords ($1, "dogoifto", 2); () = define_keywords ($1, "enduse", 3); () = define_keywords ($1, "callcasedataelseexitgotokindopenreadrealsavestopthentype", 4); () = define_keywords ($1, "blockclosecycleenddoendifentrypauseprintwherewhilewrite", 5); () = define_keywords ($1, "commondoubleformatintentmodulepublicrecordreturnrewindselecttarget", 6); () = define_keywords ($1, "complexendfileendtypeincludeinquireintegerlogicalnullifypointerprivateprogram", 7); () = define_keywords ($1, "allocatecontainscontinueendwhereexternalfunctionimplicitnamelistoptionalsequence", 8); () = define_keywords ($1, "associatebackspacecharacterdimensionelsewhereendmoduleendselectinterfaceintrinsicparameterprecisionrecursivestructure", 9); () = define_keywords ($1, "deallocateendprogramselectcasesubroutine", 10); () = define_keywords ($1, "allocatableendfunctionequivalence", 11); () = define_keywords ($1, "endblockdataendinterface", 12); () = define_keywords ($1, "endsubroutine", 13); () = define_keywords ($1, "moduleprocedure", 15); () = define_keywords_n ($1, "eqgegtleltneor", 2, 1); () = define_keywords_n ($1, "absallandanycosdimexpintiorlenlgelgtllelltlogmaxminmodnotsinsumtan", 3, 1); () = define_keywords_n ($1, "acosaintasinatancharcoshdblehugeiandieorkindnintpackrealscansignsinhsizesqrttanhtinytrimtrue", 4, 1); () = define_keywords_n ($1, "aimaganintatan2btestcmplxconjgcountdprodfalseflooribclribitsibseticharindexishftlog10mergeradixrangescaleshape", 5, 1); () = define_keywords_n ($1, "cshiftdigitsiacharishftclboundmatmulmaxlocmaxvalminlocminvalmodulomvbitsrepeatspreaduboundunpackverify", 6, 1); () = define_keywords_n ($1, "adjustladjustrceilingeoshiftepsilonlogicalnearestpresentproductreshapespacing", 7, 1); () = define_keywords_n ($1, "bit_sizeexponentfractionlen_trimtransfer", 8, 1); () = define_keywords_n ($1, "allocatedprecisionrrspacingtranspose", 9, 1); () = define_keywords_n ($1, "associated", 10, 1); () = define_keywords_n ($1, "dot_productmaxexponentminexponentrandom_seed", 11, 1); () = define_keywords_n ($1, "set_exponentsystem_clock", 12, 1); () = define_keywords_n ($1, "date_and_timerandom_number", 13, 1); () = define_keywords_n ($1, "selected_int_kind", 17, 1); () = define_keywords_n ($1, "selected_real_kind", 18, 1); } set_syntax_flags ("F90_free", 1); set_syntax_flags ("F90_fixed", 1|2); set_fortran_comment_chars ("F90_fixed", "^0-9 \t\n"); private define setup_f90_mode (format) { variable mode = "F90"; set_mode (sprintf ("%s-%s", mode, format), 0x4 | 0x10); use_keymap (mode); set_buffer_hook ("indent_hook", "f90_indent"); set_buffer_hook ("newline_indent_hook", "f90_newline"); set_format_mode (format); use_syntax_table (strcat ("F90_", format)); } public define f90_free_format_mode () { setup_f90_mode ("free"); run_mode_hooks ("f90_free_format_mode_hook"); } public define f90_fixed_format_mode () { setup_f90_mode ("fixed"); run_mode_hooks ("f90_fixed_format_mode_hook"); } %!%+ %\function{f90_mode} %\synopsis{f90_mode} %\description % Mode designed for the purpose of editing F90 files. % After the mode is loaded, the hook 'f90_hook' is called. % Useful functions include: %#v+ % Function: Default Binding: % f90_continue_newline ESC RETURN % indents current line, and creates a continuation line on next line. % f90_comment ESC ; % comments out current line % f90_uncomment ESC : % uncomments current line % f90_electric_label 0-9 % Generates a label for current line or simply inserts a digit. % f90_next_statement ^C^N % moves to next f90 statementm skips comment lines % f90_previous_statement ^C^P % moves to previous f90 statement, skips comment lines % f90_ruler ^C^R % inserts a ruler above the current line. Press any key to continue % f90_beg_of_subprogram ESC ^A % moves cursor to beginning of current subroutine/function % f90_end_of_subprogram ESC ^E % moves cursor to end of current subroutine/function % f90_mark_subprogram ESC ^H % mark the current subroutine/function %#v- % Variables include: %#v+ % F90_Continue_Char --- character used as a continuation character. % By default, its value is "&" % F90_Comment_String --- string used by 'f90_comment' to % comment out a line. The default string is "C "; % F90_Indent_Amount --- number of spaces to indent statements in % a block. The default is 2. % F90_Default_Format --- Either "fixed" or "free". %#v- %!%- public define f90_mode () { setup_f90_mode (strlow (F90_Default_Format)); run_mode_hooks ("f90_mode_hook"); set_comment_info (F90_Comment_String, "", 0x4); } provide ("f90");
Close