home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume4 / bpe / unpatch1 next >
Encoding:
Internet Message Format  |  1989-02-03  |  3.8 KB

  1. Path: xanth!mcnc!rutgers!ucsd!ames!necntc!ncoast!allbery
  2. From: src@mssx.UUCP (Pleschutznig Andreas)
  3. Newsgroups: comp.sources.misc
  4. Subject: v04i002: Patches to prev. posted Screen oriented BPE
  5. Keywords: BPE V1.1
  6. Message-ID: <675@mssx.UUCP>
  7. Date: 25 Jul 88 09:19:20 GMT
  8. Sender: allbery@ncoast.UUCP
  9. Reply-To: src@mssx.UUCP (Pleschutznig Andreas)
  10. Organization: Micro Systems Software, Graz
  11. Lines: 207
  12. Approved: allbery@ncoast.UUCP
  13.  
  14. Posting-number: Volume 4, Issue 2
  15. Submitted-by: "Pleschutznig Andreas" <src@mssx.UUCP>
  16. Archive-name: bpe/unPatch1
  17.  
  18. [ed-style diffs.  What say we insist on context diffs from now on?  ++bsa]
  19.  
  20. #-----------------------Cut Here --------------------------
  21. #The following is a shell Archive. To reconstruct the files in it
  22. #type sh filename. Do not use Csh !!
  23.  
  24. echo x - bpe.diffs
  25. sed 's/^X//' >bpe.diffs <<'*-*-END-of-bpe.diffs-*-*'
  26. X489a
  27. X
  28. X.
  29. X448a
  30. X    mvwprintw(win,18,15,"Q - Quit Program");
  31. X.
  32. X445d
  33. X439,440c
  34. X    mvwprintw(win,7,15,
  35. X        "F - Find string in file (beginning from curr. position)");
  36. X    mvwprintw(win,8,15,"/ - Idem");
  37. X.
  38. X430d
  39. X415d
  40. X405d
  41. X398a
  42. X    }
  43. X.
  44. X397d
  45. X392,394c
  46. X            }
  47. X            if (' ' <= (c = secbuf[i * 16 + j]) && c < DEL)
  48. X                mvprintw(ASCY+i,ASCX+j,"%c", c);
  49. X.
  50. X386a
  51. X            mvprintw(ASCY+i,HEXX+j*3,"%02X",secbuf[i*16+j] & 0xFF);
  52. X        }
  53. X.
  54. X384,385d
  55. X379c
  56. X        mvprintw(ASCY+i,0,"%08lX",filpos+i*16);
  57. X.
  58. X376,377c
  59. X
  60. X    mvprintw(4,0,
  61. X" ADDRESS    00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F      ASCII");
  62. X
  63. X    mvprintw(5,0, "=======================================================\
  64. X========================");
  65. X
  66. X.
  67. X373c
  68. X    int    i, j, c;
  69. X.
  70. X357d
  71. X350c
  72. X    }
  73. X.
  74. X334c
  75. X        refresh();
  76. X    }
  77. X    move(2, 0);
  78. X.
  79. X331,332d
  80. X328c
  81. X        }
  82. X.
  83. X324a
  84. X        }
  85. X.
  86. X323d
  87. X295d
  88. X244a
  89. X#endif
  90. X.
  91. X243a
  92. X#ifndef NOKEYPAD
  93. X    printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^C");
  94. X#else
  95. X.
  96. X191a
  97. X    }
  98. X.
  99. X190d
  100. X146a
  101. X#endif
  102. X.
  103. X145a
  104. X#ifdef NOKEYPAD
  105. X    printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^C");
  106. X#else
  107. X.
  108. X134c
  109. X    }
  110. X.
  111. X132d
  112. X93a
  113. X            case '/':
  114. X.
  115. X76c
  116. X    header("BPE Version 1.1",filename,"(C) 1988 MSS Graz");
  117. X.
  118. X72d
  119. X66a
  120. X    clear();
  121. X    refresh();
  122. X.
  123. X63a
  124. X#endif
  125. X.
  126. X62a
  127. X#ifdef NOKEYPAD
  128. X.
  129. X55c
  130. X    }
  131. X.
  132. X51c
  133. X    }
  134. X.
  135. X45,46c
  136. Xchar    **argv;
  137. X.
  138. X28a
  139. X#define        CTRL(c)        ((c) ^ 0100)
  140. X#define        DEL        CTRL('?')
  141. X
  142. X#ifdef NOKEYPAD
  143. X#define        KEY_LEFT    CTRL('H')
  144. X#define        KEY_DOWN    CTRL('J')
  145. X#define        KEY_UP        CTRL('K')
  146. X#define        KEY_RIGHT    CTRL('L')
  147. X#define        O_RDWR        2
  148. X#define        cbreak()    crmode()
  149. X#define        beep()        putchar(7)
  150. X#endif
  151. X
  152. X.
  153. X8a
  154. XBUG REPORTS:
  155. X============
  156. X    - The offset count in the first column is wrong,
  157. X      except for the first line; it's 0x10 too high.
  158. X                                (fixed)
  159. X    - The test in disp() if a char is printable, fails
  160. X      for chars >= 0177.
  161. X                                (fixed)
  162. X
  163. X    - Help message for 'H' incorrect            (fixed)
  164. X
  165. X
  166. X.
  167. X7c
  168. X1.0     first version (seems to do things right)           andy@mssx
  169. X1.1    some bugs fixed (tks to Maarten)            andy@mssx.uucp
  170. X                                maart@cs.vu.nl
  171. X.
  172. Xw
  173. Xq
  174. X
  175. *-*-END-of-bpe.diffs-*-*
  176. echo x - makefile
  177. sed 's/^X//' >makefile <<'*-*-END-of-makefile-*-*'
  178. X#
  179. X# If your Terminals and your curses lib supports keypad()
  180. X# do not define the NOKEYPAD, else do 
  181. XNKEYPAD=dummy
  182. X# NKEYPAD=NOKEYPAD
  183. X
  184. XCFLAGS = -O -D$(NKEYPAD)
  185. XLIBES = -lcurses
  186. XOBJS = bpe.o
  187. XSRCS = bpe.c
  188. XEXEC = bpe
  189. X
  190. X$(EXEC): $(OBJS)
  191. X    cc $(OBJS) -o $(EXEC) $(LIBES)
  192. X
  193. X$(OBJS): $(SRCS)
  194. X    cc -c $(CFLAGS) $(SRCS)
  195. *-*-END-of-makefile-*-*
  196. echo x - readme
  197. sed 's/^X//' >readme <<'*-*-END-of-readme-*-*'
  198. XThis is Version 1.1 for the BPE Program I wrote some time ago,
  199. Xthere has been some bug fixes(tks to maart@cs.vu.nl).
  200. X
  201. XTo generate the new Version of the BPE program type
  202. X
  203. X    ed <bpe.diffs bpe.c
  204. X
  205. Xthen look at the new makefile, and correct the NKEYPAD value to
  206. Xsuit for your System. 
  207. X
  208. X
  209. X
  210. XAny further comments and bug reports are welcomed.
  211. X
  212. X
  213. X
  214. X
  215. XAndreas Pleschutznig
  216. XMicro Systems Software
  217. XGraz, Austria
  218. Xandy@mssx
  219. *-*-END-of-readme-*-*
  220. exit
  221.