home *** CD-ROM | disk | FTP | other *** search
/ The UNIX CD Bookshelf / OREILLY_TUCB_UNIX_CD.iso / upt / examples / SOURCES / INDEX / SSOL2 / INDEX. next >
Encoding:
Text File  |  1998-07-24  |  1.2 KB  |  57 lines

  1. --- Makefile.rtr    Sat Jul 23 11:28:33 1994
  2. +++ Makefile    Mon Jul 25 09:09:21 1994
  3. @@ -15,8 +15,9 @@
  4.  # Initial revision
  5.  # 
  6.  #
  7. -CFLAGS=    -O
  8. -LIBS=    -lcurses -ltermcap
  9. +CC=gcc
  10. +CFLAGS=    -g 
  11. +LIBS=    -lcurses -ltermcap -lgen
  12.  
  13.  SRCS=    createdb.c dbfunc.c dbio.c main.c printdb.c screen.c \
  14.      searchdb.c selectdb.c util.c
  15. --- screen.c.rtr    Sat Jul 23 11:28:59 1994
  16. +++ screen.c    Mon Jul 25 09:08:04 1994
  17. @@ -21,6 +21,7 @@
  18.  #include <curses.h>
  19.  #include <stdio.h>
  20.  #include "defs.h"
  21. +#define index strchr
  22.  
  23.  static int    screen_inited = 0;    /* for use with set/reset modes    */
  24.  
  25. @@ -65,6 +66,8 @@
  26.       * is allowed basic EMACS-style line editing.
  27.       */
  28.      while ((c = getchar()) != EOF) {
  29. +        if(c == '\r') 
  30. +            c = '\n';
  31.          switch (c) {
  32.          case CTRL('a'):            /* beginning of line    */
  33.              col = col0;
  34. @@ -242,6 +245,8 @@
  35.       * Read characters...
  36.       */
  37.      while ((c = getchar()) != EOF) {
  38. +        if(c == '\r') 
  39. +            c = '\n';
  40.          /*
  41.           * If it's not a valid one, beep
  42.           * and get another one.
  43. @@ -565,6 +570,8 @@
  44.       * control characters.
  45.       */
  46.      while ((c = getchar()) != EOF) {
  47. +        if(c == '\r') 
  48. +            c = '\n';
  49.          /*
  50.           * Get the current line and line length.
  51.           */
  52. @@ -851,4 +858,3 @@
  53.      noecho();
  54.      cbreak();
  55.  }
  56. -
  57.