home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1404 < prev    next >
Encoding:
Internet Message Format  |  1990-12-28  |  3.6 KB

  1. From: ross@contact.uucp (Ross Ridge)
  2. Newsgroups: alt.sources
  3. Subject: Patch #2 to tinfo, a public domain termcap/terminfo implementation.
  4. Message-ID: <1990Jun3.012440.24126@contact.uucp>
  5. Date: 3 Jun 90 01:24:40 GMT
  6.  
  7. This is patch #2 to the tinfo library I posted to alt.sources in April '90.
  8. It fixes some important bugs, and makes a few small changes.
  9.  
  10. tinfo is a merges the functions of termcap and terminfo, and can use either
  11. of the two's databases.  If you would like a copy of the original postings
  12. (5 parts), and/or the first patch please E-MAIL me (ross@contact.uucp),
  13. and I'll mail them to you.
  14.  
  15. [By accident I lost a few peoples requests last time, if you asked but didn't
  16.  get anything last time please ask again.]
  17.  
  18.                                 Ross Ridge
  19.  
  20. Note: this is a normal diff, so if you've made your own changes to the source
  21.       patch will be less forgiving.
  22.  
  23. ------------------
  24.  
  25. Index: conv.1
  26. Prereq: "90/05/19"
  27. 2c2
  28. < .TH CONV 1 "90/05/19" "tinfo"
  29. ---
  30. > .TH CONV 1 "90/06/02" "tinfo"
  31. Index: findterm.c
  32. Prereq: 90/03/22
  33. 5c5
  34. <  * 90/03/22 03:43:31
  35. ---
  36. >  * 90/06/02 20:55:44
  37. 16c16
  38. < static char SCCSid[] = "@(#) findterm.c 1.1";
  39. ---
  40. > static char SCCSid[] = "@(#) findterm.c 1.2";
  41. 72c72,73
  42. <     if (fstat(fd, &st) == -1)
  43. ---
  44. >     if (fstat(fd, &st) == -1) {
  45. >         close(fd);
  46. 73a75
  47. >     }
  48. 89c91,92
  49. <     if (f == NULL)
  50. ---
  51. >     if (f == NULL) {
  52. >         close(fd);
  53. 90a94
  54. >     }
  55. 131a136,139
  56. >                 if (!cont) {
  57. >                     fclose(f);
  58. >                     return 1;
  59. >                 }
  60. 160a169
  61. >                 fclose(f);
  62. 194a204
  63. >                 fclose(f);
  64. 204a215
  65. >     fclose(f);
  66. Index: terminfo.c
  67. Prereq: 90/03/27
  68. 6c6
  69. <  * 90/03/27 18:29:45
  70. ---
  71. >  * 90/06/01 16:45:21
  72. 15,17c15,16
  73. < #ifdef USE_SCCS_IDS
  74. < static char SCCSid[] = "@(#) terminfo.c 1.2";
  75. < #endif
  76. ---
  77. > static char SCCSid[] = "@(#) terminfo.c 1.3";
  78. 19a19,21
  79. > #ifdef __GNUC__
  80. > __inline__
  81. > #endif
  82. 25c27,28
  83. < #define RETERR(e, msg)  { (err == NULL ? (printerr(msg), exit(1), 0) : (*err = e)); return ERR; }
  84. ---
  85. > #define RETERR(e, msg)  { (err == NULL ? (printerr(msg), exit(1), 0) \
  86. >                        : (*err = e)); return ERR; }
  87. 29c32,33
  88. < #define RETERR(e, msg)  { (err == NULL ? (fprintf(stderr, msg), exit(1), 0) : (*err = e)); return ERR; }
  89. ---
  90. > #define RETERR(e, msg)  { (err == NULL ? (fprintf(stderr, msg), exit(1), 0) \
  91. >                        : (*err = e)); return ERR; }
  92. Index: termcap.c
  93. Prereq: 90/03/22
  94. 6c6
  95. <  * 90/03/22 03:43:33
  96. ---
  97. >  * 90/06/01 16:45:19
  98. 15,17c15,16
  99. < #ifdef USE_SCCS_IDS
  100. < static char SCCSid[] = "@(#) termcap.c 1.1";
  101. < #endif
  102. ---
  103. > static char SCCSid[] = "@(#) termcap.c 1.2";
  104. Index: tcapvars.c
  105. Prereq: 90/03/22
  106. 6c6
  107. <  * 90/03/22 03:43:43
  108. ---
  109. >  * 90/05/31 17:44:20
  110. 14c14
  111. < static char SCCSid[] = "@(#) tcapvars.c 1.1";
  112. ---
  113. > static char SCCSid[] = "@(#) tcapvars.c 1.2";
  114. 18c18
  115. < int ospeed;
  116. ---
  117. > short ospeed;
  118. Index: conv.c
  119. Prereq: 90/04/18
  120. 6c6
  121. <  * 90/04/18 07:43:15
  122. ---
  123. >  * 90/06/02 20:55:13
  124. 46c46
  125. < static char SCCSid[] = "@(#) conv.c 1.5";
  126. ---
  127. > static char SCCSid[] = "@(#) conv.c 1.6";
  128. 666a667,676
  129. > int badname(name)
  130. > char *name; {
  131. >     while(*name) {
  132. >         if (*name == '/' || !isgraph(*name))
  133. >             return 1;
  134. >         name++;
  135. >     }
  136. >     return 0;
  137. > }
  138. 696a707,714
  139. >         if (badname(s)) {
  140. >             if (lineno)
  141. >                 warn();
  142. >             fprintf(stderr, "bad terminal name '%s', ingored.\n",
  143. >                 s);
  144. >             s--;
  145. >             continue;
  146. >         }
  147. 740a759,763
  148. >     if (last[0] == '\0') {
  149. >         if (lineno)
  150. >             warn();
  151. >         fprintf(stderr, "no terminal name, entry ignored.\n");
  152. >     }
  153. 857a881,884
  154. > #if DEBUG
  155. >     printf("%s\n", buf);
  156. > #endif
  157. 873a901,903
  158. > #if DEBUG
  159. >     printf("...%s\n", name);
  160. > #endif
  161. 1051c1081
  162. <                 buf[--l] = '\0';
  163. ---
  164. >                 line[--l] = '\0';
  165. -- 
  166. Ross Ridge                                 //
  167. "The Great HTMU"                            [oo]
  168. ross@contact.uucp                            -()-
  169. ross@watcsc.waterloo.edu                         //
  170.