diff options
author | B. Watson <yalhcru@gmail.com> | 2021-08-29 14:37:53 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-13 00:51:54 +0700 |
commit | b2fc5c03c09d3e7cb6ec5836157f941ee7b5048a (patch) | |
tree | aa953a90ca216bb0f25f62d4b08ca06ed34fa856 /development/dhex | |
parent | 02ca95f7ceb3d4667e1590339d6ff064d29b5d98 (diff) |
development/dhex: Fix typos and grammar.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/dhex')
-rw-r--r-- | development/dhex/010_fix-typos.patch | 177 | ||||
-rw-r--r-- | development/dhex/dhex.SlackBuild | 14 | ||||
-rw-r--r-- | development/dhex/dhex.info | 4 |
3 files changed, 189 insertions, 6 deletions
diff --git a/development/dhex/010_fix-typos.patch b/development/dhex/010_fix-typos.patch new file mode 100644 index 000000000000..e782e6e9a8db --- /dev/null +++ b/development/dhex/010_fix-typos.patch @@ -0,0 +1,177 @@ +Description: fix typos and spelling errors +Author: Gürkan Myczko <gurkan@phys.ethz.ch> +Author: Fabio Augusto De Muzio Tobich <ftobich@gmail.com> +Forwarded: no +Last-Update: 2020-11-08 + +Index: dhex/README.txt +=================================================================== +--- dhex.orig/README.txt ++++ dhex/README.txt +@@ -110,9 +110,9 @@ read from it, -r can be used. For exampl + sets the cursor to 0xaffe, and searches for the hex string "d0 0f" backwards + from there. + +-% ./dhex -oh affe -shb d00f -w occurances.log dhex ++% ./dhex -oh affe -shb d00f -w occurrences.log dhex + +-writes the results into a logfile called "occurances.log" and exits. ++writes the results into a logfile called "occurrences.log" and exits. + + -----------------------------------------------------------------[ 5. Hexcalc ]- + +Index: dhex/datatypes.h +=================================================================== +--- dhex.orig/datatypes.h ++++ dhex/datatypes.h +@@ -101,7 +101,7 @@ typedef struct _tSearch + tBool forwardnotbackward; + char searchstring[32]; + tInt16 searchlen; +- tInt64 occurancesfound; ++ tInt64 occurrencesfound; + tInt64 lastoccurance; + tInt64 lastsearchlogpos; + } tSearch; +Index: dhex/dhex.1 +=================================================================== +--- dhex.orig/dhex.1 ++++ dhex/dhex.1 +@@ -101,7 +101,7 @@ + .Ek + .Sh DESCRIPTION + .Nm +-is a hex editor. It can be used to alter individual bytes in large files. Since it is a text-mode programm based on ncurses, it can run in numerous scenarios. ++is a hex editor. It can be used to alter individual bytes in large files. Since it is a text-mode program based on ncurses, it can run in numerous scenarios. + . + Its special feature is the diff mode: With it, the user has a visual tool for file comparison. This mode is invoked when + .Nm +@@ -155,7 +155,7 @@ from an exotic terminal. + .It Fl m Ar markerfile + It is possible in + .Nm +-to set bookmarks and store them in a markerfile for later use. With this parameter, the markerfile is being read at start time, making it unnecesarry to read them later through the gui. Their file format is described in ++to set bookmarks and store them in a markerfile for later use. With this parameter, the markerfile is being read at start time, making it unnecessary to read them later through the gui. Their file format is described in + .Xr dhex_markers 5 . + .It Fl ob od oh oo Ar offset + After loading a file, the cursor is set to 0, and the first page of bytes is being shown on the screen. With one of those parameters it is possible to start at any other location in the file. The cursorposition could be given as a binary number with +@@ -179,11 +179,11 @@ or an octal one with + .Pp + This way, the first few bytes in a file can be skipped, and just the rest can be compared. + .It Fl r Ar searchlog +-When searching from the command line, the offsets are being read from this searchlog. Its format is being decribed in ++When searching from the command line, the offsets are being read from this searchlog. Its format is being described in + .Xr dhex_searchlog 5 . + .It Fl r1 Ar searchlog1 + .It Fl r2 Ar searchlog2 +-When searching in two files simultanously, the offsets can be read from two different searchlogs. ++When searching in two files simultaneously, the offsets can be read from two different searchlogs. + .It Fl sa sab sh shb Ar string + Instead of setting the cursor offset to an absolute value, it is possible to search for a specific string from the command line. If there is an additional + .Op Fl ob od oh oo Ar offset +@@ -202,7 +202,7 @@ or + can be applied. + .It Fl s1a s1ab s1h s1hb Ar string1 + .It Fl s2a s2ab s2h s2hb Ar string2 +-In the diff mode, it is possible to search for two strings in two files simultanously. ++In the diff mode, it is possible to search for two strings in two files simultaneously. + .It Fl v + Prints out the version of + .Nm . +@@ -212,7 +212,7 @@ When searching from the command line, wr + .Pp + .It Fl \&w1 Ar searchlog1 + .It Fl w2 Ar searchlog2 +-When searching in two files simultanously, write the results from both searches into those log files. ++When searching in two files simultaneously, write the results from both searches into those log files. + .El + .Sh USER INTERFACE + .Ss General +@@ -235,11 +235,11 @@ If no other + .Op Fl o + or + .Op Fl a +-parameter was given at start time, the cursor is being set to offset 0. It is also being shown in the hex column. Here, it can be moved with the cursor keys. When entering a hexadecimal number, the file is being edited. The file can be edited in the ascii column as well, simply by pressing the TAB key (or whichever key was substituted for it in the keyboard setup). Pressing TAB again will return the cursor to the hex column. Pressing F9 (or its substitute) will undo the last of the changes. Changes are being shown in a differnt color. ++parameter was given at start time, the cursor is being set to offset 0. It is also being shown in the hex column. Here, it can be moved with the cursor keys. When entering a hexadecimal number, the file is being edited. The file can be edited in the ascii column as well, simply by pressing the TAB key (or whichever key was substituted for it in the keyboard setup). Pressing TAB again will return the cursor to the hex column. Pressing F9 (or its substitute) will undo the last of the changes. Changes are being shown in a different color. + .Pp + Editing is not possible in the diff mode. Here, pressing the cursor keys will move both files synchronously. + .Ss The goto screen +-Pressing F1 (or its substitute) will open the Goto... screen. Here, it is possible to jump to a specific address directly, without the need of scrolling there with the cursor keys. The address can be entered in the 'To' field, either absolute or relative (to leap over a specified amount of bytes). An absolute address is being chosen by pressing '=', and a relative one by pressing '+' or '-', for a positive or negative leap respectively. Regardless of the adressing mode, it has to be entered as a hexadecimal number. ++Pressing F1 (or its substitute) will open the Goto... screen. Here, it is possible to jump to a specific address directly, without the need of scrolling there with the cursor keys. The address can be entered in the 'To' field, either absolute or relative (to leap over a specified amount of bytes). An absolute address is being chosen by pressing '=', and a relative one by pressing '+' or '-', for a positive or negative leap respectively. Regardless of the addressing mode, it has to be entered as a hexadecimal number. + .Pp + It is also possible to set up to ten bookmarks in this screen: Pressing '0'...'9' will select one of them. Moving the cursor to "Set" and pressing ENTER will alter one of those book marks. The "Diff:" fields are showing the difference between the actual cursor position and the bookmark. + .Pp +@@ -249,11 +249,11 @@ parameter. + .Xr dhex_markers 5 + describes the format of the marker files. + .Ss Searching +-Pressing F2 (or its subsitute) will open the Search... screen. Here, a short string can be entered (either in hex, or in ascii). If no logfiles are being selected, the cursor will jump to the next occurance of this search string upon selection of "Go". It can be chosen if the search is supposed to be conducted forward of backwards. ++Pressing F2 (or its substitute) will open the Search... screen. Here, a short string can be entered (either in hex, or in ascii). If no logfiles are being selected, the cursor will jump to the next occurrence of this search string upon selection of "Go". It can be chosen if the search is supposed to be conducted forward of backwards. + .Pp +-To jump to the next occurance, F3 (or its substitute) has to be pressed. To jump to the previous one, F4 has to be pressed. The search itself wraps at the edges of the file, meaning that when it reaches the end, it will start from the beginning and vice versa. ++To jump to the next occurrence, F3 (or its substitute) has to be pressed. To jump to the previous one, F4 has to be pressed. The search itself wraps at the edges of the file, meaning that when it reaches the end, it will start from the beginning and vice versa. + .Pp +-Searchlogs are an advanced way of searching: Writing to the searchlog does not jump the cursor from one occurance to the next. Instead, it will write the offsets of all of them into the logfile. Their format is described in ++Searchlogs are an advanced way of searching: Writing to the searchlog does not jump the cursor from one occurrence to the next. Instead, it will write the offsets of all of them into the logfile. Their format is described in + .Xr dhex_searchlog 5 . + .Pp + Reading from this searchlog means that the search does not cover the whole file: Only the addresses which have been provided in this file are being searched. Thus it is possible to search for specific changes. Like for example the number of lives stored in the save file of a game. +Index: dhex/main.c +=================================================================== +--- dhex.orig/main.c ++++ dhex/main.c +@@ -67,7 +67,7 @@ void helpscreen(char* argv0,int exitval) + fprintf(stderr," -sa, -SA, -sab, -SAB [x] find the ascii string x in file (b=backwards)\n"); + fprintf(stderr," -sh, -SH, -shb, -SHB [x] find the hex string x in file (b=backwards)\n"); + fprintf(stderr," -r, -R [read searchlog] read the search positions from this searchlog\n"); +- fprintf(stderr," -w, -W [write searchlog] write the location of the occurances to this log\n"); ++ fprintf(stderr," -w, -W [write searchlog] write the location of the occurrences to this log\n"); + fprintf(stderr,"\n"); + fprintf(stderr,"%s [Parameters] [Filename1] [Filename2]: Diff mode\n",argv0); + fprintf(stderr," -cd, -CD [x] correlate with the minimum difference\n"); +@@ -688,7 +688,7 @@ int main(int argc,char** argv) + cursorpos2=actcursorpos2; + } + } +- else if (search1.occurancesfound) ++ else if (search1.occurrencesfound) + { + searchfor(&search1,buf1,&cursorpos1,(ch==KEYF3)); // f3: next + firstpos1=cursorpos1; +@@ -762,8 +762,8 @@ int main(int argc,char** argv) + if (markers) free(markers); + welcomescreen(argv[0]); + } else { +- if (gosearch1) fprintf(stderr,"%lli occurances found in %s\n",search1.occurancesfound,buf1->filename); +- if (gosearch2) fprintf(stderr,"%lli occurances found in %s\n",search2.occurancesfound,buf2->filename); ++ if (gosearch1) fprintf(stderr,"%lli occurrences found in %s\n",search1.occurrencesfound,buf1->filename); ++ if (gosearch2) fprintf(stderr,"%lli occurrences found in %s\n",search2.occurrencesfound,buf2->filename); + } + return 0; + } +Index: dhex/search.c +=================================================================== +--- dhex.orig/search.c ++++ dhex/search.c +@@ -123,7 +123,7 @@ tInt8 searchfor(tSearch* search,tBuffer* + else found=0; + if (found) + { +- search->occurancesfound++; ++ search->occurrencesfound++; + search->lastoccurance=actcursorpos; + if (search->writesearchlog) fprintf(fwlog,"%016llx\n",(tUInt64)actcursorpos+buf->baseaddr); else done=1; + } +Index: dhex/ui.c +=================================================================== +--- dhex.orig/ui.c ++++ dhex/ui.c +@@ -100,7 +100,7 @@ void searchmask(tOutput* output,tSearch* + { + drawcenterframe(output,14,60,"Found"); + setcolor(output,COLOR_TEXT); +- mvwprintw(output->win,offsy+13,offsx+1,"%lld occurances found",search->occurancesfound); ++ mvwprintw(output->win,offsy+13,offsx+1,"%lld occurrences found",search->occurrencesfound); + getkey((tKeyTab*)output->pKeyTab,1); + } + } diff --git a/development/dhex/dhex.SlackBuild b/development/dhex/dhex.SlackBuild index 2f555e09e378..9cc2d62dbaae 100644 --- a/development/dhex/dhex.SlackBuild +++ b/development/dhex/dhex.SlackBuild @@ -6,11 +6,13 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20210829 bkw: BUILD=2, fix typos in docs/src, fix grammar in docs. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=dhex VERSION=${VERSION:-0.69} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -22,9 +24,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -60,6 +59,13 @@ chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ +# 20210829 bkw: patch borrowed from Debian, with thanks. +patch -p1 < $CWD/010_fix-typos.patch + +# 20210829 bkw: the above patch doesn't address the weird grammar +# in the man pages (use of "being" as a noise-word). So: +sed -i 's,\(is\|are\) *being,\1,g' $PRGNAM.1 *.5 + sed -i -e 's,-O3,'"$SLKCFLAGS"',' -e 's,share/man,man,' Makefile make LDFLAGS="-L/usr/lib$LIBDIRSUFFIX" diff --git a/development/dhex/dhex.info b/development/dhex/dhex.info index 8b51c816cb4b..6088159d7b51 100644 --- a/development/dhex/dhex.info +++ b/development/dhex/dhex.info @@ -1,7 +1,7 @@ PRGNAM="dhex" VERSION="0.69" -HOMEPAGE="http://www.dettus.net/dhex/" -DOWNLOAD="http://www.dettus.net/dhex/dhex_0.69.tar.gz" +HOMEPAGE="https://www.dettus.net/dhex/" +DOWNLOAD="https://www.dettus.net/dhex/dhex_0.69.tar.gz" MD5SUM="64d557437fe110c19f23ed3e9bbcdd54" DOWNLOAD_x86_64="" MD5SUM_x86_64="" |