1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791
|
HEXER(1) HEXER(1)
NNAAMMEE
hexer - binary file editor
SSYYNNOOPPSSIISS
hheexxeerr [options] [file [...]]
DDEESSCCRRIIPPTTIIOONN
hheexxeerr is a multi-buffer editor for viewing and manipulat-
ing binary files. It can't (shouldn't) be used for edit-
ing block devices, because it tries to load the whole file
into a buffer (it should work for diskettes). The most
important features of hheexxeerr are: multi buffers, multi
level undo, command line editing with completion, binary
regular expressions (see below). The user interface is
kept similar to vvii, so if you know how to use vvii, you'll
get started easily.
OOPPTTIIOONNSS
--RR,, ----rreeaaddoonnllyy
--vv,, ----vviieeww
Edit files in read only mode.
--rr,, ----rreeccoovveerr _f_i_l_e_n_a_m_e
Recover the file _f_i_l_e_n_a_m_e after a crash. (not imple-
mented)
--cc,, ----ccoommmmaanndd _c_o_m_m_a_n_d
Start the editing session by executing the editor com-
mand _c_o_m_m_a_n_d. If _c_o_m_m_a_n_d contains spaces, it must be
surrounded by double quotes. It is possible to spec-
ify multiple commands on the command line:
hheexxeerr --cc _c_o_m_m_a_n_d_1 --cc _c_o_m_m_a_n_d_2 ......
--tt,, ----ttiittee
Turn off the usage of the termcap/terminfo ti/te
sequence.
--hh,, ----hheellpp
Print out a short help message and exit.
++_c_o_m_m_a_n_d
This is equivalent to the --cc option.
NNoottee:: The long options are not available on all systems.
CCUUSSTTOOMMIIZZIINNGG
The editor reads its startup commands from the file
~~//..hheexxeerrrrcc (another startup file may be specified by set-
ting the environment variable HHEEXXEERRRRCC). Empty lines and
lines starting with a `"'-character (double quote) are
ignored. It is not possible to have a command and a comment
in the same line.
Hexer 0.1.4b 1996 January 12 1
HEXER(1) HEXER(1)
EEDDIITTOORR CCOOMMMMAANNDDSS
As in vvii, there are several editing modes:
CCoommmmaanndd MMooddee
Some commands in CCoommmmaanndd MMooddee can take a numeric argument.
To enter a numeric argument just type the (dec-
imal) number. The number will be echoed at the bottom
line of the screen as you type. To enter an octal
number, type a `0' as the first digit. To enter a
hexadecimal number, type `0x' (this is not a problem,
because the xx-command with a zero counter wouldn't
make sense anyway). Some of the commands can take a
visually selected area as an argument (see subsection
VViissuuaall MMooddee).
bb Move backwards to the beginning of a word.
ee Move to the end of a word.
GG If a numeric argument nn is given, move the cur-
sor to position nn. If no argument is speci-
fied, set the position to the end of the
buffer. The first byte in the buffer is at
position `0', so the command to move to the
beginning of the buffer is `0G'.
CCoonnttrrooll--GG
Display the buffer name, size, status and the
current position at the bottom line.
hh jj kk ll
Move the cursor. The arrow keys work as well.
The numeric argument (if specified) determines
the number rows or columns the cursor will
move. Different from vvii: the cursor can be
positioned bbeehhiinndd the last byte in the buffer.
ii Enter IInnsseerrtt MMooddee (see below) at the current
position of the point. If a numeric argument nn
is given, the typed text will be inserted nn
times. NNoottee:: Moving the cursor (using the
arrow keys) will discard the numeric argument.
nn Move to the next match using the current RE.
This is equivalent to typing `/', <Return>.
NN Move to the previous match using the current
RE. This is equivalent to typing `?',
<Return>.
CCoonnttrrooll--OO
Paste over. Copy the kill buffer to the cur-
rent position overwriting the contents of the
current buffer. If a numeric argument nn is
Hexer 0.1.4b 1996 January 12 2
HEXER(1) HEXER(1)
given, the kill buffer is pasted nn times.
pp Paste. Insert the kill buffer at the current
position. If a numeric argument nn is given,
the kill buffer is pasted nn times.
rr Replace a single byte using the RReeppllaaccee MMooddee.
If an area is selected, all bytes in the
selected area are replaced. If a numeric argument
is given, the specified number of bytes is
replaced.
RR Enter RReeppllaaccee MMooddee (see below). If a numeric
argument nn is given, the replace command is
repeated nn times. NNoottee:: Moving the cursor
(using the arrow keys) will discard the numeric
argument.
CCoonnttrrooll--RR
Redo the last undo.
uu Undo the last change to the current buffer.
Whenever possible hheexxeerr creates a file _n_a_m_e..hheexxeerr in
the current directory (the sswwaappffiillee) for each buffer
visited (where _n_a_m_e is the name of the buffer). All
changes made to the buffer _n_a_m_e are stored in that
file, so it is possible to undo (and redo) all changes
made to the buffer. If the sswwaappffiillee can't be created,
the undo list is stored in the memory.
vv Enter VViissuuaall MMooddee (see below). Visual selec-
tion of areas.
ww Move forward to the beginning of a word.
xx Delete the byte under the cursor. If a numeric
argument nn is given, nn bytes are deleted. In
VViissuuaall MMooddee, the selected area is deleted.
NNoottee:: The bytes deleted using the xx-command are
not copied to the kill buffer.
CCoonnttrrooll--XX
The same as the xx-command, but the bytes
deleted are copied to the kill buffer.
yy Yank. Yank the byte under the cursor into the
kill buffer. If a numeric argument nn is given,
nn bytes are yanked into the kill buffer. In
VViissuuaall MMooddee, the selected area is copied to the
kill buffer.
zzbb Place the cursor in the bottom line of the
screen.
Hexer 0.1.4b 1996 January 12 3
HEXER(1) HEXER(1)
zztt Place the cursor in the top line of the screen.
zzzz Place the cursor in the middle line of the
screen.
Note that the commands zzbb, zztt and zzzz don't
change the position in the file - only the
screen is scrolled (if necessary).
:: Enter EExxhh MMooddee (see below). The EExxhh MMooddee is
similar to the eexx-mode in vvii, but not compati-
ble. If an area is selected, the bounds of the
selection are copied to the command line.
// Search forward through the buffer using a
RREE(rreegguullaarr eexxpprreessssiioonn). If no RREE is specified,
the RREE given in the previous //- or ??-command is
reused.
NNoottee:: The RREEs in hheexxeerr are a little bit differ-
ent from regular expressions in vvii (see section
RREEGGUULLAARR EEXXPPRREESSSSIIOONNSS).
?? Search reverse using a regular expression.
.. Repeat the last change to the buffer aatt tthhee
ccuurrrreenntt ppoossiittiioonn. This means that if the pre-
vious command deleted nn bytes and replaced them
by mm other bytes (nn or mm may be zero), the
..-command will do eexxaaccttllyy the same at the cur-
rent position in the file.
<< Shift the hex column left nn bytes, where nn is
the (optional) numeric argument. Note that the
<<-command only changes the way the buffer is
displayed in the hex column, the buffer itself
is kept unchanged.
>> Shift the hex column right nn bytes.
CCoonnttrrooll--^^
Switch to the alternate buffer (see below).
%% Enter a calculator command (see section CCAALLCCUU--
LLAATTOORR).
VViissuuaall MMooddee
Select an area on the buffer. You can enter the
VViissuuaall MMooddee by using the vv-command or by specifying an
area in EExxhh MMooddee. The selection starts at the cursor
position when entering the VViissuuaall MMooddee and ends at the
current cursor position. You can leave the VViissuuaall
MMooddee without performing a command on the selected area
by pressing vv or EEssccaappee. To perform a command on the
selected area simply enter the command as if you where
Hexer 0.1.4b 1996 January 12 4
HEXER(1) HEXER(1)
in CCoommmmaanndd MMooddee. Commands that can't use the selec-
tion will ignore it. As in CCoommmmaanndd MMooddee, it is possi-
ble to specify a numeric argument. Commands that can
take the selection as an argument will ignore the
numeric argument.
IInnsseerrtt MMooddee
In IInnsseerrtt MMooddee the bytes you type are inserted at the
current position of the cursor. At any time, you can
toggle the active column (hex column or text column)
by pressing the TTAABB-key. If the hex column is active
the bytes are entered as two digit hex numbers, if the
text column is active, the bytes are entered as ASCII
text. The DDeelleettee- or BBaacckkSSppaaccee-key deletes the previ-
ously inserted byte. If the hex column is active, the
previously inserted nibble (hex digit) is deleted. It
is not possible to delete more bytes than have been
inserted in the current insert command. While in
IInnsseerrtt MMooddee, you can move the cursor using the arrow
keys. Note that moving the cursor discards the
numeric argument given to the insert command. To
leave the IInnsseerrtt MMooddee, type EEssccaappee. If a numeric
argument nn was given to the insert command and is
hasn't been discarded by a cursor movement, the typed
bytes are inserted nn times.
RReeppllaaccee MMooddee
In RReeppllaaccee MMooddee you replace the bytes under the cursor
as you type. Hitting BBaacckkSSppaaccee restores the original
contents of the buffer. The effect of a numeric argument
is similar to the IInnsseerrtt MMooddee: the typed bytes
are replaced nn times. As in IInnsseerrtt MMooddee, moving the
cursor using the arrow keys discards the numeric argument.
EExxhh MMooddee
The EExxhh MMooddee in hheexxeerr is kept similar to the eexx-mode
in vvii. Typically, an eexxhh command looks like:
::_a_r_e_a _c_o_m_m_a_n_d _a_r_g_u_m_e_n_t_s
Perform the command _c_o_m_m_a_n_d on the area _a_r_e_a.
::_c_o_m_m_a_n_d _a_r_g_u_m_e_n_t_s
Perform the command ccoommmmaanndd at the current
position.
::_a_r_e_a Select the area _a_r_e_a.
::_p_o_s_i_t_i_o_n
Move the cursor to position _p_o_s_i_t_i_o_n.
An area may be defined as:
Hexer 0.1.4b 1996 January 12 5
HEXER(1) HEXER(1)
_p_o_s_i_t_i_o_n_1_,_p_o_s_i_t_i_o_n_2
The area starts at _p_o_s_i_t_i_o_n_1 and ends at _p_o_s_i_-
_t_i_o_n_2 (inclusive).
_p_o_s_i_t_i_o_n
The area selects one byte at _p_o_s_i_t_i_o_n
_% The area selects the entire buffer.
A position may be defined as:
_o_f_f_s_e_t A decimal, octal (prefixed with `0') or hex
(prefixed with `0x') number.
_. The beginning of the buffer.
_$ The end of the buffer.
/_r_e_g_e_x_p/
A regular expression (see section RREEGGUULLAARR
EEXXPPRREESSSSIIOONNSS). The buffer is searched forward
starting at the current position. If a match
was found, the current position is set to the
position of the match.
?_r_e_g_e_x_p?
The buffer is searched reverse.
Commands may be abbreviated with a unique prefix of
the command, some commands may be abbreviated with a
single character, even if that character isn't a
unique prefix of the command name. Currently the fol-
lowing commands are supported:
ss,, ssuubbssttiittuuttee
SSyynnooppssiiss:: _a_r_e_a ss /_r_e_g_e_x_p/_r_e_p_l_a_c_e/_f_l_a_g_s
Search for the regular expression _r_e_g_e_x_p and
replace it with _r_e_p_l_a_c_e (see section RREEGGUULLAARR
EEXXPPRREESSSSIIOONNSS). _r_e_p_l_a_c_e may contain `\' refer-
ences to subexpressions of regexp_. _f_l_a_g_s:
gg: global, this flag is ignored (it doesn't
make sense in a binary editor).
cc: confirm, ask the user to confirm each
substitution.
(Note that the `/' character used as separator
could be any character, it's just common prac-
tice to use `/'.) Trailing separators may be
omitted. If _a_r_e_a is omitted, the whole buffer
is searched.
Hexer 0.1.4b 1996 January 12 6
HEXER(1) HEXER(1)
ww,, wwrriittee
SSyynnooppssiiss:: _a_r_e_a ww _f_i_l_e_n_a_m_e
Write _a_r_e_a to the file _f_i_l_e_n_a_m_e. If _a_r_e_a is
omitted. the whole buffer is written to the
file, if _f_i_l_e_n_a_m_e is omitted, the filename
associated with the buffer is used.
rr,, rreeaadd
SSyynnooppssiiss:: _p_o_s_i_t_i_o_n rr _f_i_l_e_n_a_m_e
Insert the contents of the file _f_i_l_e_n_a_m_e at
_p_o_s_i_t_i_o_n. If _p_o_s_i_t_i_o_n is omitted, the current
position is used.
ee,, eeddiitt
SSyynnooppssiiss:: ee _n_a_m_e oorr:: ee ##
Change to buffer _n_a_m_e. If there is no such
buffer, hheexxeerr tries to open a file named _n_a_m_e
and load it into a new buffer. If _n_a_m_e is a
hash sign (##), the alternate buffer is
selected. On success the current buffer
becomes the alternate buffer.
bb,, bbuuffffeerr
SSyynnooppssiiss:: bb _n_a_m_e
oorr:: bb
Change to buffer _n_a_m_e. On success the current
buffer becomes the alternate buffer. If _n_a_m_e
is omitted, a list of all buffers is displayed.
nn,, nneexxtt
Select the next buffer in the buffer list.
NN,, pprreevviioouuss
Select the previous buffer in th buffer list.
SS,, sskkiipp
Select the next unvisited buffer in the buffer
list.
rreewwiinndd Select the first buffer in the buffer list.
wwaallll Write all unsaved buffers.
cc,, cclloossee
SSyynnooppssiiss:: cc _n_a_m_e
oorr:: cc!! _n_a_m_e
oorr:: cc
oorr:: cc!!
Close the buffer _n_a_m_e. If _n_a_m_e is omitted, the
current buffer is closed. If the buffer has
been modified, but not saved, it can't be
closed using a ::cc-command; use ::cc!! to over-
ride.
Hexer 0.1.4b 1996 January 12 7
HEXER(1) HEXER(1)
hh,, hheellpp
View an online help text.
qq,, qquuiitt
SSyynnooppssiiss:: qq _n_a_m_e
oorr:: qq!! _n_a_m_e
oorr:: qq
oorr:: qq!!
Close all buffers and exit the editor. If an
opened buffer has bee modified, but not saved,
the ::qq-command can't be performed; use ::qq!! to
override.
mmaapp
iimmaapp
vvmmaapp SSyynnooppssiiss:: mmaapp _f_r_o_m _t_o
oorr:: iimmaapp _f_r_o_m _t_o
oorr:: vvmmaapp _f_r_o_m _t_o
The key sequence _f_r_o_m is mapped to _t_o. To
enter special keys (e.g. function keys), mask
them using CCoonnttrrooll--VV. ::mmaapp affects the CCoommmmaanndd
MMooddee only, ::iimmaapp affects the IInnsseerrtt MMooddee only
and ::vvmmaapp affects the VViissuuaall MMooddee only. It is
not possible to re-map key sequences on the
command line editor.
uunnmmaapp
iiuunnmmaapp
vvuunnmmaapp SSyynnooppssiiss:: uunnmmaapp _f_r_o_m
oorr:: iiuunnmmaapp _f_r_o_m
oorr:: vvuunnmmaapp _f_r_o_m
Delete a key mapping created with ::mmaapp, ::iimmaapp
or ::vvmmaapp.
sseett SSyynnooppssiiss:: sseett _v_a_r_i_a_b_l_e [...]
oorr:: sseett _v_a_r_i_a_b_l_e=_v_a_l_u_e [...]
oorr:: sseett nnoo_v_a_r_i_a_b_l_e [...]
oorr:: sseett
There are not too many variables that could be
modified, this might change though. The fol-
lowing variables can be used: iissoo (bool): dis-
play the whole ISO-8859/1 character set; aasscciiii
(bool): display ASCII characters only; TTEERRMM
(string): the name of the terminal; mmaaxxmmaattcchh
(number), ssppeecciiaallnnll (bool): see section RREEGGUULLAARR
EEXXPPRREESSSSIIOONNSS. ::sseett called without an argument
lists all variables and values.
dd,, ddeelleettee
SSyynnooppssiiss:: _a_r_e_a dd
Hexer 0.1.4b 1996 January 12 8
HEXER(1) HEXER(1)
Delete all bytes in _a_r_e_a. The deleted bytes
are copied to the kill buffer.
yy,, yyaannkk
SSyynnooppssiiss:: _a_r_e_a yy
Copy the bytes in _a_r_e_a to the kill buffer.
vveerrssiioonn
Display the version number of hheexxeerr.
zzzz Place the cursor in the middle line of the
screen. Note that the screen is scrolled (if
necessary); the cursor position is kept
unchanged.
zztt Place the cursor in the top line of the screen.
zzbb Place the cursor in the bottom line of the
screen.
wwqq The same as ::xx.
xx,, eexxiitt
Save all buffers and exit the editor.
If a command is called and can't use the given posi-
tions, areas or arguments, the additional positions,
areas, arguments are ignored.
CCoonnddiittiioonnaall ccoommmmaannddss:: It is possible to specify a list
of terminal names for which the given command should
be executed. The syntax is:
::_t_e_r_m_i_n_a_l_s::_c_o_m_m_a_n_d
where _t_e_r_m_i_n_a_l_s is a colon-separated list of terminal
names. The command is executed if and only if the
value of TTEERRMM is in the list. I.e. you could have a
command like
::xxtteerrmm::sseett iissoo
in your ..hheexxeerrrrcc-file (use the ISO character set only
if working on an xterm).
CCuurrssoorr MMoottiioonn
In CCoommmmaanndd MMooddee, IInnsseerrtt MMooddee, RReeppllaaccee MMooddee and VViissuuaall
MMooddee, you can use the following cursor motion com-
mands:
AArrrrooww KKeeyyss
Move the cursor.
CCoonnttrrooll--FF
Move forward one page.
CCoonnttrrooll--BB
Move back one page.
Hexer 0.1.4b 1996 January 12 9
HEXER(1) HEXER(1)
CCoonnttrrooll--DD
Move forward half a page.
CCoonnttrrooll--UU
Move back half a page.
CCOOMMMMAANNDD LLIINNEE EEDDIITTIINNGG
On the command line you can use the following commands:
UUppAArrrrooww DDoowwnnAArrrrooww
Move up and down through the history of the current
context.
LLeeffttAArrrrooww RRiigghhttAArrrrooww
Move the cursor.
CCoonnttrrooll--AA
Move the cursor to the beginning of the line.
CCoonnttrrooll--EE
Move the cursor to the end of the line.
CCoonnttrrooll--KK
Delete all characters from the current cursor posi-
tion up to the end of the line.
CCoonnttrrooll--UU
Delete all characters from the beginning of the
line up to the current cursor position.
DDeelleettee
BBaacckkSSppaaccee
Delete the character left of the cursor.
CCoonnttrrooll--DD
Delete the character under the cursor.
EEnntteerr RReettuurrnn
Accept the line.
EEssccaappee Discard the line. NNoottee:: This is different from vvii.
TTAABB Try to complete currently typed word. If the com-
pletion is not unique, the word is completed as far
as unique. If the TTAABB-key is hit twice on the same
position, a list of all possible completions is
displayed.
RREEGGUULLAARR EEXXPPRREESSSSIIOONNSS
In this section it is assumed that you are familiar with
REs (regular expressions). In most applications (eeggrreepp,
vvii, ...) REs work on lines, that means it is not possible
Hexer 0.1.4b 1996 January 12 10
HEXER(1) HEXER(1)
to use a RE containing a line break (newline character).
In hheexxeerr, the buffer is not split up into distinct lines
and a newline character is considered to be a `normal'
character, now here's the problem: imagine searching for
"a.*b" in a 5 MB file, this would take very long (might be
up to several minutes on a slow machine). That's why
there's a mmaaxxmmaattcchh limit (a repeat operator matches at
most mmaaxxmmaattcchh occurrences of its operand). The default
value of mmaaxxmmaattcchh is 1024, but it may be customized using
the ::sseett-command. For simple expressions (expressions for
which the length of the match can be determined from the
expression) it is possible to override the mmaaxxmmaattcchh limit
by doubling the `*' or `+' operator, e.g. "a.**b" or
"foo\(bar\)\+\+".
Note that the context specifiers `^'/`$' (beginning/end of
a line) and `\<'/`\>' (beginning/end of a word) are avail-
able and actually do what you expect. If you don't want
the atoms `.' and `[^...]' to match the newline character
you can set the ssppeecciiaallnnll option using the ::sseett-command.
To enter a special character, you can use the standard C
`\'-escape sequences. To enter a character using its
octal code, use a `\o'-prefix followed by up to three
octal digits. (C-style octal escapes are not supported,
because `\0', ... `\9' are interpreted as back-references
to subexpressions of the RE.) To enter a character using
it's hex code, type a `\x'-prefix followed by up to two
hex digits; decimal codes can be entered using a
`\d'-prefix followed by up to three decimal digits. It is
possible to enter strings of codes by doubling the base
specifier, e.g. "\xxfe ff 5a 7e" or "\oo276 277 132 176".
Note that such a string is treated as an atom, i.e. the
RE "\xxff fe*" matches any number (< mmaaxxmmaattcchh) of repeti-
tions of ffff ffee.
It is possible to use all kinds of character `\'-escapes
(escapes representing a single character) within
`[]'-ranges. Within a range, the `o' selecting an octal
base for the escape may be omitted, since back-references
within a range don't make sense. When specifying a mini-
mum and/or maximum number of repetitions using the
`\{,}'-operator, the numbers may be given in decimal (no
prefix), octal (`0'-prefix) or hex (`0x'-prefix). If no
maximum number is specified and the operand is not a sim-
ple expression, at most mmaaxxmmaattcchh matches will be found.
CCAALLCCUULLAATTOORR
HHeexxeerr provides a simple calculator (mmyycc) capable of all
operations available in C. To enter a mmyycc command just
enter a %% (percent) sign and an expression in infix nota-
tion. It is possible to use parentheses. mmyycc understands
the following binary infix operators (from highest prior-
ity to lowest): **** (power), ** (multiply), // (divide), %%
(modulo), ++ (add), -- (subtract), <<<< (shift left), >>>>
(shift right), << (less), <<== (less or equal), >> (greater),
>>== (greater or equal), ==== (equal), !!== (not equal), &&
Hexer 0.1.4b 1996 January 12 11
HEXER(1) HEXER(1)
(arithmetical and), || (arithmetical or), ^^ (arithmetical
exclusive or), &&&& (logical and), |||| (logical or), ==
(assign); and the following unary prefix operators: --
(negate, unary minus), !! (logical not), ~~ (bitwise com-
plement). mmyycc knows three data types: bboooolleeaann, iinntteeggeerr
(32 bit), ffllooaatt (64 bit, equivalent to C double). On some
esoteric platforms the precision of integer and float may
be different. As in C the result of a division depends on
the data types of the operands. An integer divided by an
integer yields an integer. If you want the result to be a
float, make sure one of the operands is a float, e.g. type
_4_/_7_. instead of _4_/_7 or _a_/_(_b_+_0_._) instead of _a_/_b. The
power operation returns a float if the result is too large
to fit in an integer. The result of a calculation is
stored in the special variables $$$$ and $$_n where _n is the
number of the command.
BBUUGGSS
Probably. Please report bugs to _d_e_m_e_t_r_i_o_@_c_s_._u_n_i_-_s_b_._d_e.
CCOOPPYYRRIIGGHHTT
hheexxeerr is nnoott iinn tthhee ppuubblliicc ddoommaaiinn, but freely dis-
tributable. It may be used for any non-commercial pur-
pose. See file CCOOPPYYRRIIGGHHTT for details.
AAUUTTHHOORR
Sascha Demetrio
_d_e_m_e_t_r_i_o_@_c_s_._u_n_i_-_s_b_._d_e
Hexer 0.1.4b 1996 January 12 12
|