010_fix-typos.patch 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. Description: fix typos and spelling errors
  2. Author: Gürkan Myczko <gurkan@phys.ethz.ch>
  3. Author: Fabio Augusto De Muzio Tobich <ftobich@gmail.com>
  4. Forwarded: no
  5. Last-Update: 2020-11-08
  6. Index: dhex/README.txt
  7. ===================================================================
  8. --- dhex.orig/README.txt
  9. +++ dhex/README.txt
  10. @@ -110,9 +110,9 @@ read from it, -r can be used. For exampl
  11. sets the cursor to 0xaffe, and searches for the hex string "d0 0f" backwards
  12. from there.
  13. -% ./dhex -oh affe -shb d00f -w occurances.log dhex
  14. +% ./dhex -oh affe -shb d00f -w occurrences.log dhex
  15. -writes the results into a logfile called "occurances.log" and exits.
  16. +writes the results into a logfile called "occurrences.log" and exits.
  17. -----------------------------------------------------------------[ 5. Hexcalc ]-
  18. Index: dhex/datatypes.h
  19. ===================================================================
  20. --- dhex.orig/datatypes.h
  21. +++ dhex/datatypes.h
  22. @@ -101,7 +101,7 @@ typedef struct _tSearch
  23. tBool forwardnotbackward;
  24. char searchstring[32];
  25. tInt16 searchlen;
  26. - tInt64 occurancesfound;
  27. + tInt64 occurrencesfound;
  28. tInt64 lastoccurance;
  29. tInt64 lastsearchlogpos;
  30. } tSearch;
  31. Index: dhex/dhex.1
  32. ===================================================================
  33. --- dhex.orig/dhex.1
  34. +++ dhex/dhex.1
  35. @@ -101,7 +101,7 @@
  36. .Ek
  37. .Sh DESCRIPTION
  38. .Nm
  39. -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.
  40. +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.
  41. .
  42. Its special feature is the diff mode: With it, the user has a visual tool for file comparison. This mode is invoked when
  43. .Nm
  44. @@ -155,7 +155,7 @@ from an exotic terminal.
  45. .It Fl m Ar markerfile
  46. It is possible in
  47. .Nm
  48. -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
  49. +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
  50. .Xr dhex_markers 5 .
  51. .It Fl ob od oh oo Ar offset
  52. 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
  53. @@ -179,11 +179,11 @@ or an octal one with
  54. .Pp
  55. This way, the first few bytes in a file can be skipped, and just the rest can be compared.
  56. .It Fl r Ar searchlog
  57. -When searching from the command line, the offsets are being read from this searchlog. Its format is being decribed in
  58. +When searching from the command line, the offsets are being read from this searchlog. Its format is being described in
  59. .Xr dhex_searchlog 5 .
  60. .It Fl r1 Ar searchlog1
  61. .It Fl r2 Ar searchlog2
  62. -When searching in two files simultanously, the offsets can be read from two different searchlogs.
  63. +When searching in two files simultaneously, the offsets can be read from two different searchlogs.
  64. .It Fl sa sab sh shb Ar string
  65. 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
  66. .Op Fl ob od oh oo Ar offset
  67. @@ -202,7 +202,7 @@ or
  68. can be applied.
  69. .It Fl s1a s1ab s1h s1hb Ar string1
  70. .It Fl s2a s2ab s2h s2hb Ar string2
  71. -In the diff mode, it is possible to search for two strings in two files simultanously.
  72. +In the diff mode, it is possible to search for two strings in two files simultaneously.
  73. .It Fl v
  74. Prints out the version of
  75. .Nm .
  76. @@ -212,7 +212,7 @@ When searching from the command line, wr
  77. .Pp
  78. .It Fl \&w1 Ar searchlog1
  79. .It Fl w2 Ar searchlog2
  80. -When searching in two files simultanously, write the results from both searches into those log files.
  81. +When searching in two files simultaneously, write the results from both searches into those log files.
  82. .El
  83. .Sh USER INTERFACE
  84. .Ss General
  85. @@ -235,11 +235,11 @@ If no other
  86. .Op Fl o
  87. or
  88. .Op Fl a
  89. -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.
  90. +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.
  91. .Pp
  92. Editing is not possible in the diff mode. Here, pressing the cursor keys will move both files synchronously.
  93. .Ss The goto screen
  94. -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.
  95. +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.
  96. .Pp
  97. 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.
  98. .Pp
  99. @@ -249,11 +249,11 @@ parameter.
  100. .Xr dhex_markers 5
  101. describes the format of the marker files.
  102. .Ss Searching
  103. -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.
  104. +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.
  105. .Pp
  106. -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.
  107. +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.
  108. .Pp
  109. -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
  110. +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
  111. .Xr dhex_searchlog 5 .
  112. .Pp
  113. 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.
  114. Index: dhex/main.c
  115. ===================================================================
  116. --- dhex.orig/main.c
  117. +++ dhex/main.c
  118. @@ -67,7 +67,7 @@ void helpscreen(char* argv0,int exitval)
  119. fprintf(stderr," -sa, -SA, -sab, -SAB [x] find the ascii string x in file (b=backwards)\n");
  120. fprintf(stderr," -sh, -SH, -shb, -SHB [x] find the hex string x in file (b=backwards)\n");
  121. fprintf(stderr," -r, -R [read searchlog] read the search positions from this searchlog\n");
  122. - fprintf(stderr," -w, -W [write searchlog] write the location of the occurances to this log\n");
  123. + fprintf(stderr," -w, -W [write searchlog] write the location of the occurrences to this log\n");
  124. fprintf(stderr,"\n");
  125. fprintf(stderr,"%s [Parameters] [Filename1] [Filename2]: Diff mode\n",argv0);
  126. fprintf(stderr," -cd, -CD [x] correlate with the minimum difference\n");
  127. @@ -688,7 +688,7 @@ int main(int argc,char** argv)
  128. cursorpos2=actcursorpos2;
  129. }
  130. }
  131. - else if (search1.occurancesfound)
  132. + else if (search1.occurrencesfound)
  133. {
  134. searchfor(&search1,buf1,&cursorpos1,(ch==KEYF3)); // f3: next
  135. firstpos1=cursorpos1;
  136. @@ -762,8 +762,8 @@ int main(int argc,char** argv)
  137. if (markers) free(markers);
  138. welcomescreen(argv[0]);
  139. } else {
  140. - if (gosearch1) fprintf(stderr,"%lli occurances found in %s\n",search1.occurancesfound,buf1->filename);
  141. - if (gosearch2) fprintf(stderr,"%lli occurances found in %s\n",search2.occurancesfound,buf2->filename);
  142. + if (gosearch1) fprintf(stderr,"%lli occurrences found in %s\n",search1.occurrencesfound,buf1->filename);
  143. + if (gosearch2) fprintf(stderr,"%lli occurrences found in %s\n",search2.occurrencesfound,buf2->filename);
  144. }
  145. return 0;
  146. }
  147. Index: dhex/search.c
  148. ===================================================================
  149. --- dhex.orig/search.c
  150. +++ dhex/search.c
  151. @@ -123,7 +123,7 @@ tInt8 searchfor(tSearch* search,tBuffer*
  152. else found=0;
  153. if (found)
  154. {
  155. - search->occurancesfound++;
  156. + search->occurrencesfound++;
  157. search->lastoccurance=actcursorpos;
  158. if (search->writesearchlog) fprintf(fwlog,"%016llx\n",(tUInt64)actcursorpos+buf->baseaddr); else done=1;
  159. }
  160. Index: dhex/ui.c
  161. ===================================================================
  162. --- dhex.orig/ui.c
  163. +++ dhex/ui.c
  164. @@ -100,7 +100,7 @@ void searchmask(tOutput* output,tSearch*
  165. {
  166. drawcenterframe(output,14,60,"Found");
  167. setcolor(output,COLOR_TEXT);
  168. - mvwprintw(output->win,offsy+13,offsx+1,"%lld occurances found",search->occurancesfound);
  169. + mvwprintw(output->win,offsy+13,offsx+1,"%lld occurrences found",search->occurrencesfound);
  170. getkey((tKeyTab*)output->pKeyTab,1);
  171. }
  172. }