nvi.sh (3234B)
1 #!/bin/sh -u 2 # 3 # Make sure we can see nvi run. 4 # 5 . tt/package.subr "editors/nvi" 6 plan 11 7 8 pkg_check_deps 9 pkg_clean 10 pkg_build 11 12 cat <<EOF > check.good 13 Summary: 14 116 Source files used as input 15 3 Application link commands 16 116 Rewrite successes 17 116 Rewritten source compile successes 18 19 Totals: 20 47915 Lines of source code 21 660 Function definitions 22 1712 If statements 23 177 For loops 24 33 While loops 25 6 Do while loops 26 100 Switch statements 27 981 Return statement values 28 1650 Call expressions 29 49441 Total statements 30 4009 Binary operators 31 353 Errors rewriting source 32 EOF 33 pkg_check 34 35 cat <<EOF > tu_list.good 36 /cl/cl_funcs.c 853 37 /cl/cl_main.c 423 38 /cl/cl_read.c 331 39 /cl/cl_screen.c 585 40 /cl/cl_term.c 478 41 /common/conv.c 471 42 /common/cut.c 352 43 /common/delete.c 164 44 /common/encoding.c 237 45 /common/exf.c 1525 46 /common/key.c 871 47 /common/line.c 658 48 /common/log.c 768 49 /common/main.c 608 50 /common/mark.c 278 51 /common/msg.c 913 52 /common/options.c 1189 53 /common/options_f.c 358 54 /common/put.c 234 55 /common/recover.c 974 56 /common/screen.c 233 57 /common/search.c 500 58 /common/seq.c 409 59 /common/util.c 424 60 /ex/ex.c 2370 61 /ex/ex_abbrev.c 114 62 /ex/ex_append.c 270 63 /ex/ex_args.c 331 64 /ex/ex_argv.c 915 65 /ex/ex_at.c 125 66 /ex/ex_bang.c 188 67 /ex/ex_cd.c 132 68 /ex/ex_cmd.c 446 69 /ex/ex_cscope.c 1098 70 /ex/ex_delete.c 65 71 /ex/ex_display.c 144 72 /ex/ex_edit.c 160 73 /ex/ex_equal.c 59 74 /ex/ex_file.c 83 75 /ex/ex_filter.c 318 76 /ex/ex_global.c 317 77 /ex/ex_init.c 431 78 /ex/ex_join.c 171 79 /ex/ex_map.c 119 80 /ex/ex_mark.c 45 81 /ex/ex_mkexrc.c 102 82 /ex/ex_move.c 193 83 /ex/ex_open.c 46 84 /ex/ex_preserve.c 105 85 /ex/ex_print.c 332 86 /ex/ex_put.c 51 87 /ex/ex_quit.c 46 88 /ex/ex_read.c 362 89 /ex/ex_screen.c 132 90 /ex/ex_script.c 628 91 /ex/ex_set.c 46 92 /ex/ex_shell.c 228 93 /ex/ex_shift.c 187 94 /ex/ex_source.c 96 95 /ex/ex_stop.c 51 96 /ex/ex_subst.c 1442 97 /ex/ex_tag.c 1315 98 /ex/ex_txt.c 426 99 /ex/ex_undo.c 77 100 /ex/ex_usage.c 191 101 /ex/ex_util.c 217 102 /ex/ex_version.c 40 103 /ex/ex_visual.c 164 104 /ex/ex_write.c 376 105 /ex/ex_yank.c 46 106 /ex/ex_z.c 146 107 /regex/regcomp.c 1630 108 /regex/regerror.c 172 109 /regex/regexec.c 174 110 /regex/regfree.c 79 111 /vi/getc.c 223 112 /vi/v_at.c 114 113 /vi/v_ch.c 283 114 /vi/v_cmd.c 506 115 /vi/v_delete.c 106 116 /vi/v_ex.c 651 117 /vi/v_increment.c 265 118 /vi/v_init.c 130 119 /vi/v_itxt.c 515 120 /vi/v_left.c 284 121 /vi/v_mark.c 232 122 /vi/v_match.c 178 123 /vi/v_paragraph.c 341 124 /vi/v_put.c 141 125 /vi/v_redraw.c 38 126 /vi/v_replace.c 203 127 /vi/v_right.c 142 128 /vi/v_screen.c 64 129 /vi/v_scroll.c 448 130 /vi/v_search.c 549 131 /vi/v_section.c 251 132 /vi/v_sentence.c 356 133 /vi/v_status.c 39 134 /vi/v_txt.c 2923 135 /vi/v_ulcase.c 172 136 /vi/v_undo.c 136 137 /vi/v_util.c 168 138 /vi/v_word.c 527 139 /vi/v_xchar.c 104 140 /vi/v_yank.c 81 141 /vi/v_z.c 146 142 /vi/v_zexit.c 53 143 /vi/vi.c 1247 144 /vi/vs_line.c 539 145 /vi/vs_msg.c 901 146 /vi/vs_refresh.c 887 147 /vi/vs_relative.c 295 148 /vi/vs_smap.c 1243 149 /vi/vs_split.c 950 150 EOF 151 152 # Redirect stdout so that nvi does not start up on the console when this script 153 # is run interactively. 154 $workdir/build/nvi > /dev/null 155 156 ok "is write_tus.pl exit code 0" \ 157 perl -I$treedir $treedir/tt/write_tus.pl ${CITRUN_PROCDIR}nvi_* 158 159 # nvi ends up using absolute paths to source files when compiling. 160 ok "strip tu paths" sed -i -e "s,/usr/ports/pobj/nvi-[0-9.]*/nvi2-[0-9.]*,," tu_list.out 161 pkg_check_manifest 162 163 pkg_clean