home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / bsd / 9070 / Ingres.diff.Z / Ingres.diff
Encoding:
Text File  |  1992-11-19  |  50.6 KB  |  2,365 lines

  1. Only in source: README.kenji
  2. diff -r source/conf/Makefile ../ingres.ptf/source/conf/Makefile
  3. 71c71
  4. < INGRES=    /usr/ingres
  5. ---
  6. > INGRES=    ../..
  7. 80c80
  8. < SYSBIN=    /usr/local/bin
  9. ---
  10. > SYSBIN=    /usr/local
  11. 82c82
  12. < SYSLIB=    /usr/lib
  13. ---
  14. > SYSLIB=    /usr/local/lib
  15. 84c84
  16. < CPUTYPE=VAX
  17. ---
  18. > CPUTYPE=SUN
  19. 112d111
  20. < EXTRALIB=
  21. 117c116
  22. < CFLAGS=    -O -I$H -Dbsd386
  23. ---
  24. > CFLAGS=    -I$H -O
  25. 119d117
  26. 146c144
  27. <     $(CC) $(LDFLAGS) version.o $@.o $(DBULIB) $(OTHERS) $(ALLLIB) $(EXTRALIB) ../dbu/create.o ../gutil/oatoi.o -o $@
  28. ---
  29. >     $(CC) $(LDFLAGS) version.o $@.o $(DBULIB) $(OTHERS) $(ALLLIB) -o $@
  30. 153c151
  31. <     $(CC) $(LDFLAGS) version.o $@.o $(OTHERS) $(ALLLIB) $(EXTRALIB) -o $@
  32. ---
  33. >     $(CC) $(LDFLAGS) version.o $@.o $(OTHERS) $(ALLLIB) -o $@
  34. 160c158
  35. <     $(CC) $(LDFLAGS) version.o $@.o $(OTHERS) $(MONITOR) $(CTLMOD) $(IUTIL) $(GUTIL) $(EXTRALIB) -o $@
  36. ---
  37. >     $(CC) $(LDFLAGS) version.o $@.o $(OTHERS) $(MONITOR) $(CTLMOD) $(IUTIL) $(GUTIL) -o $@
  38. 167c165
  39. <     $(CC) $(LDFLAGS) version.o $@.o $(OTHERS) $(SYSMONITOR) $(CTLMOD) $(IUTIL) $(GUTIL) $(EXTRALIB) -o $@
  40. ---
  41. >     $(CC) $(LDFLAGS) version.o $@.o $(OTHERS) $(SYSMONITOR) $(CTLMOD) $(IUTIL) $(GUTIL) -o $@
  42. 176c174
  43. <     $(CC) $(LDFLAGS) version.o $@.o $(OTHERS) $(ALLLIBS) $(MATH) $(EXTRALIB) -o $@
  44. ---
  45. >     $(CC) $(LDFLAGS) version.o $@.o $(OTHERS) $(ALLLIBS) $(MATH) -o $@
  46. diff -r source/conf/monitor.c ../ingres.ptf/source/conf/monitor.c
  47. 1d0
  48. < # include       <ingres.h>
  49. 20,22d18
  50. < DESC    Btreesec;
  51. < int    Btree_fd;
  52. diff -r source/ctlmod/Makefile ../ingres.ptf/source/ctlmod/Makefile
  53. 7c7
  54. < INGRES=    /usr/ingres
  55. ---
  56. > INGRES=    ../..
  57. 92c92
  58. <     ctags  $(SRCS1) $(SRCS2) $(HDRS)
  59. ---
  60. >     ctags  $(SRCS) $(HDRS)
  61. diff -r source/ctlmod/call.c ../ingres.ptf/source/ctlmod/call.c
  62. 11,15d10
  63. < int   call();
  64. < int   calln();
  65. < int   call_setup();
  66. < extern  int   resetp();
  67. 61d55
  68. < int
  69. 83d76
  70. < int
  71. 95c88
  72. < # endif xMONITOR
  73. ---
  74. > # endif MONITOR
  75. 194d186
  76. < int
  77. diff -r source/ctlmod/call_fn.c ../ingres.ptf/source/ctlmod/call_fn.c
  78. 7,8d6
  79. < int   call_fn();
  80. 36d33
  81. < int
  82. diff -r source/ctlmod/cm_cleanup.c ../ingres.ptf/source/ctlmod/cm_cleanup.c
  83. 35c35
  84. <     extern    void        rubcatch();
  85. ---
  86. >     extern            rubcatch();
  87. diff -r source/ctlmod/main.c ../ingres.ptf/source/ctlmod/main.c
  88. 8d7
  89. < # include       <access.h>
  90. 47d45
  91. < **
  92. 63c61
  93. < extern struct out_arg    Out_arg;    /* output arguments */
  94. ---
  95. > struct out_arg    Out_arg;    /* output arguments */
  96. 69,74d66
  97. < extern    void    rubcatch();
  98. < extern    int    error();
  99. < extern pb_t    *MonPpb;
  100. < extern long    CmOfiles;    /* defined in markopen.c */
  101. 84a77,78
  102. >     extern        rubcatch();
  103. >     extern        error();
  104. 85a80,81
  105. >     extern pb_t    *MonPpb;
  106. >     extern long    CmOfiles;    /* defined in markopen.c */
  107. 157c153
  108. <                                 if ( setdbl(wait_action,lock_type) < 0 )
  109. ---
  110. >                 if ( setdbl(wait_action,lock_type) < 0 )
  111. 311,314d306
  112. < **
  113. < **      This module should be renamed to compile the stuffs in the ../support
  114. < **          directory, because the latter modules also define rubproc() in
  115. < **          a different manner.
  116. 317d308
  117. < void
  118. diff -r source/ctlmod/pb_read.c ../ingres.ptf/source/ctlmod/pb_read.c
  119. 39c39
  120. <     extern void    (*ExitFn)();
  121. ---
  122. >     extern int    (*ExitFn)();
  123. diff -r source/ctlmod/proc_err.c ../ingres.ptf/source/ctlmod/proc_err.c
  124. 7,17d6
  125. < int  proc_err();
  126. < extern int pb_prime();
  127. < extern int pb_flush();
  128. < extern int pb_dump();
  129. < extern int send_off();
  130. < extern int resetp();
  131. < extern char        *Proc_name;
  132. < extern pb_t        *MonPpb;
  133. 52c41
  134. < int
  135. ---
  136. 58a48
  137. >     extern char        *Proc_name;
  138. 60a51
  139. >     extern pb_t        *MonPpb;
  140. diff -r source/ctlmod/readinput.c ../ingres.ptf/source/ctlmod/readinput.c
  141. 11,21d10
  142. < int   readinput();
  143. < int   read_arg();
  144. < extern  int   markbuf();
  145. < extern  int   pb_prime();
  146. < extern  int   pb_get();
  147. < extern  int   pb_dump();
  148. < extern  int   proc_err();
  149. < extern char    *need();
  150. < extern QTREE    *readqry();
  151. 48,49d36
  152. < int
  153. 155c142
  154. < int
  155. ---
  156. 164a152,153
  157. >     extern char    *need();
  158. >     extern QTREE    *readqry();
  159. diff -r source/ctlmod/readqry.c ../ingres.ptf/source/ctlmod/readqry.c
  160. 12,25d11
  161. < QTREE   *readqry();
  162. < bool    leaf();
  163. < extern QTREE    *readtree();
  164. < extern QTREE    *trbuild();
  165. < extern QTREE    *readsym();
  166. < extern char    *need();
  167. < extern char    *xalloc();
  168. < extern int      clrrange();
  169. < extern int      declare();
  170. < extern int      markbuf();
  171. < extern int      freebuf();
  172. < extern int      nodepr();
  173. 47a34,36
  174. >     extern QTREE    *readtree();
  175. >     extern char    *xalloc();
  176. >     extern QTREE    *trbuild();
  177. 48a38
  178. >     extern QTREE    *readsym();
  179. 122a113
  180. >     extern char    *need();
  181. 189a181
  182. >     extern char    *need();
  183. 234a227
  184. >     extern bool    leaf();
  185. diff -r source/ctlmod/resetp.c ../ingres.ptf/source/ctlmod/resetp.c
  186. 8,10d7
  187. < int   resetp();
  188. < extern char    *Proc_name;
  189. 32c29
  190. < int
  191. ---
  192. 34a32
  193. >     extern char    *Proc_name;
  194. diff -r source/ctlmod/send_off.c ../ingres.ptf/source/ctlmod/send_off.c
  195. 7,9d6
  196. < # include    <ingres.h>
  197. < # include    <aux.h>
  198. < # include    <access.h>
  199. 14,22d10
  200. < int  send_off();
  201. < int  send_arg();
  202. < extern    int pb_put();
  203. < extern    int closecatalog();
  204. < extern  int pb_dump();
  205. < extern  int freebuf();
  206. < extern  int pb_tput();
  207. < extern  int writeqry();
  208. 51d38
  209. < int
  210. 120d106
  211. < int
  212. 125a112
  213. >     extern        pb_put();
  214. diff -r source/ctlmod/sysdump.c ../ingres.ptf/source/ctlmod/sysdump.c
  215. 14,15c14,15
  216. < extern void    null_fn();
  217. < extern void    dump_cm();
  218. ---
  219. > extern int    null_fn();
  220. > extern int    dump_cm();
  221. 84d83
  222. < void
  223. 91c90
  224. <         register proc_t            *pr;
  225. ---
  226. >     register proc_t        *pr;
  227. diff -r source/ctlmod/treepr.c ../ingres.ptf/source/ctlmod/treepr.c
  228. 9,12d8
  229. < int        treepr();
  230. < static int rcsvtrpr();
  231. < int        nodepr();
  232. 28d23
  233. < int
  234. 110d104
  235. < int
  236. diff -r source/dbu/Makefile ../ingres.ptf/source/dbu/Makefile
  237. 7c7
  238. < INGRES=    /usr/ingres
  239. ---
  240. > INGRES=    ../..
  241. 38c38,39
  242. < CFLAGS=    -O -I$H -I../ctlmod -Dbsd386
  243. ---
  244. > RANLIB=    ranlib
  245. > CFLAGS=    -I$H -O -I../ctlmod
  246. 53a55
  247. >     $(RANLIB) dbulib
  248. 56a59
  249. >     $(RANLIB) $(LIB)/dbulib
  250. 62a66
  251. >     $(RANLIB) sysmonlib
  252. 65a70
  253. >     $(RANLIB) $(LIB)/sysmonlib
  254. diff -r source/dbu/copy.c ../ingres.ptf/source/dbu/copy.c
  255. 29c29
  256. < extern void    null_fn();
  257. ---
  258. > extern int    null_fn();
  259. 113c113
  260. <     void        copydone();
  261. ---
  262. >     int        copydone();
  263. 264d263
  264. < void
  265. 915d913
  266. <     char            *dumvalue();
  267. diff -r source/dbu/create.c ../ingres.ptf/source/dbu/create.c
  268. 16c16
  269. < extern    void    null_fn();
  270. ---
  271. > extern    int    null_fn();
  272. 52,54d51
  273. < extern int   errno;
  274. < extern DESC   Reldes, Attdes;
  275. 116a114,116
  276. >     extern char        *Usercode;
  277. >     extern DESC        Reldes, Attdes;
  278. >     extern int        errno;
  279. diff -r source/dbu/destroy.c ../ingres.ptf/source/dbu/destroy.c
  280. 13c13
  281. < extern     void    null_fn();
  282. ---
  283. > extern     int    null_fn();
  284. diff -r source/dbu/display.c ../ingres.ptf/source/dbu/display.c
  285. 24c24
  286. < extern void    null_fn();
  287. ---
  288. > extern int    null_fn();
  289. diff -r source/dbu/help.c ../ingres.ptf/source/dbu/help.c
  290. 15c15
  291. < extern void    null_fn();
  292. ---
  293. > extern int    null_fn();
  294. 203c203
  295. <         naa = ztack(Pathname, "/doc/naa");
  296. ---
  297. >         naa = ztack(Pathname, "/doc/iaa");
  298. diff -r source/dbu/index.c ../ingres.ptf/source/dbu/index.c
  299. 16c16
  300. < extern void    null_fn();
  301. ---
  302. > extern int    null_fn();
  303. 56d55
  304. < int
  305. diff -r source/dbu/ksort.c ../ingres.ptf/source/dbu/ksort.c
  306. 32,35d31
  307. < int    ksort();
  308. < extern void    null_fn();
  309. < extern int    cmpa();
  310. 36a33,34
  311. > extern int    ksort();
  312. > extern int    null_fn();
  313. 65a64
  314. > extern int        cmpa();
  315. 73d71
  316. < int
  317. 541d538
  318. <         char                    *setfil();
  319. 608d604
  320. <         char     *setfil();
  321. diff -r source/dbu/modify.c ../ingres.ptf/source/dbu/modify.c
  322. 20,21c20,21
  323. < int    modify();
  324. < extern     void    null_fn();
  325. ---
  326. > extern    int    modify();
  327. > extern     int    null_fn();
  328. 1622d1621
  329. <         extern int    create();
  330. diff -r source/dbu/print.c ../ingres.ptf/source/dbu/print.c
  331. 16c16
  332. < extern    void    null_fn();
  333. ---
  334. > extern    int    null_fn();
  335. diff -r source/dbu/resetrel.c ../ingres.ptf/source/dbu/resetrel.c
  336. 13c13
  337. < extern    void    null_fn();
  338. ---
  339. > extern    int    null_fn();
  340. diff -r source/dbu/rmqm.c ../ingres.ptf/source/dbu/rmqm.c
  341. 23c23
  342. < extern    void    null_fn();
  343. ---
  344. > extern    int    null_fn();
  345. diff -r source/dbu/rupdate.c ../ingres.ptf/source/dbu/rupdate.c
  346. 10c10
  347. < extern    void    null_fn();
  348. ---
  349. > extern    int    null_fn();
  350. diff -r source/dbu/save.c ../ingres.ptf/source/dbu/save.c
  351. 6d5
  352. < # ifndef bsd386          /*  by  K.Okamoto   */
  353. 10d8
  354. < # endif bsd386
  355. 18c16
  356. < extern    void    null_fn();
  357. ---
  358. > extern    int    null_fn();
  359. 62d59
  360. < # ifndef bsd386                          /*  by   K.Okamoto   */
  361. 68,71c65
  362. < # else bsd386                           /*  by   K.Okamoto     */
  363. <     extern int    timezone;    /* defined by ctime(3) */
  364. < # endif
  365. < /*    extern int    dysize();     ditto */ 
  366. ---
  367. >     extern int    dysize();    /* ditto */
  368. 124,125c118
  369. < # ifndef bsd386                        /*  by   K.Okamoto   */
  370. < # if defined(xV7_UNIX)
  371. ---
  372. > # ifdef xV7_UNIX
  373. 131,133d123
  374. < # else bsd386                         /*   by  K.Okamoto   */
  375. <     date += timezone;
  376. < # endif
  377. 250,258d239
  378. < }
  379. < dysize(year)
  380. < int year;
  381. < {
  382. <   int days=365;
  383. <   if (year % 4 == 0 && year % 100 != 0)
  384. <     days=366;
  385. <   return(days);
  386. diff -r source/dbu/sysfunc.c ../ingres.ptf/source/dbu/sysfunc.c
  387. 11,21d10
  388. < int    sysfunc();
  389. < int     optn_rel();
  390. < extern void     null_fn();
  391. < # ifdef xSTR1
  392. < extern int      prvect();
  393. < # endif
  394. < extern int      sequal();
  395. < extern int      initp();
  396. < extern int      setp();
  397. < extern int      openr();
  398. 22a12,13
  399. > extern int    sysfunc();
  400. > extern int     null_fn();
  401. 124d114
  402. < int
  403. 207c197
  404. < int
  405. ---
  406. 230,232c220
  407. < /*
  408. < void
  409. < rubproc()
  410. ---
  411. > /* rubproc()
  412. 236,237c224
  413. < }
  414. < */
  415. ---
  416. > } */
  417. diff -r source/dbu/sysmon.c ../ingres.ptf/source/dbu/sysmon.c
  418. 27,28c27,28
  419. < extern    int    systm_mon();
  420. < extern    void    systm_init();
  421. ---
  422. > extern        systm_mon();
  423. > extern        systm_init();
  424. 48d47
  425. < void
  426. 197a197
  427. 201c201,203
  428. <  /*
  429. ---
  430. > /*
  431. diff -r source/decomp/Makefile ../ingres.ptf/source/decomp/Makefile
  432. 36c36
  433. < CFLAGS=    -O -I$H 
  434. ---
  435. > CFLAGS=    -I$H -O
  436. diff -r source/decomp/de_init.c ../ingres.ptf/source/decomp/de_init.c
  437. 10d9
  438. < void
  439. 46c45
  440. < void
  441. ---
  442. 64c63
  443. < /*    return;           by  K.Okamoto     */
  444. ---
  445. >     return;
  446. diff -r source/decomp/globs.h ../ingres.ptf/source/decomp/globs.h
  447. 83c83
  448. <         SYMBOL  *constv; /* pointer to constant value symbol */
  449. ---
  450. >     SYMBOL    *const;    /* pointer to constant value symbol */
  451. diff -r source/decomp/openrs.c ../ingres.ptf/source/decomp/openrs.c
  452. 257d256
  453. <     struct desc_tab            *desc_get();
  454. diff -r source/decomp/qryproc.c ../ingres.ptf/source/decomp/qryproc.c
  455. 16,17c16,17
  456. < extern    void de_init();
  457. < extern    void de_rubproc();
  458. ---
  459. > extern    int de_init();
  460. > extern    int de_rubproc();
  461. diff -r source/decomp/usubr.c ../ingres.ptf/source/decomp/usubr.c
  462. 19,26d18
  463. < static char *getformat();
  464. < int         domnam();
  465. < int         lnode();
  466. < int         dstr_rel();
  467. < int         dstr_mark();
  468. < int         mak_t_rel();
  469. < QTREE       **mksqlist();
  470. < long        rel_pages();
  471. 32d23
  472. < int
  473. 74c65
  474. < int
  475. ---
  476. 95c86
  477. < int
  478. ---
  479. 116c107
  480. < int
  481. ---
  482. 146c137
  483. < int
  484. ---
  485. diff -r source/equel/constants.h ../ingres.ptf/source/equel/constants.h
  486. 30c30
  487. < # define    YYDEBUG    1        /* must ALWAYS be on-used in yyparse()*/
  488. ---
  489. > # define    YYDEBUG            /* must ALWAYS be on-used in yyparse()*/
  490. diff -r source/equel/prtout.c ../ingres.ptf/source/equel/prtout.c
  491. 356c356
  492. <                 fputs("\");\nIIwrite(\"", Out_file);
  493. ---
  494. >                 puts("\");\nIIwrite(\"", Out_file);
  495. 361c361
  496. <                 fputs("\\\n", Out_file);
  497. ---
  498. >                 puts("\\\n", Out_file);
  499. 377,378d376
  500. < /*  -----------      deleted  by  K.Okamoto 
  501. 390,391d387
  502. < ----------------------------------------------*/
  503. diff -r source/gutil/Makefile ../ingres.ptf/source/gutil/Makefile
  504. 7c7
  505. < INGRES=    /usr/ingres
  506. ---
  507. > INGRES=    ../..
  508. 10c10
  509. < CPUTYPE1 = i386
  510. ---
  511. > CPUTYPE=VAX
  512. 19c19
  513. <     min.o xfree.o bmove.$(CPUTYPE1).o perror.o locv.o capital.o
  514. ---
  515. >     min.o xfree.o bmove.$(CPUTYPE).o perror.o locv.o capital.o
  516. 22c22
  517. <     concat.c freebuf.c fota.c fullwait.c \
  518. ---
  519. >     concat.c freebuf.c ftoa.c fullwait.c \
  520. 29c29
  521. < ASSRC=  bmove.VAX.s bmove.SUN.c bmove.i386.c
  522. ---
  523. > ASSRC=  bmove.VAX.s bmove.SUN.c
  524. 33c33
  525. < CFLAGS=    -O -I$H
  526. ---
  527. > CFLAGS=    -I$H -O
  528. 37c37
  529. ---
  530. > RANLIB=    ranlib
  531. Only in source/gutil: bmove.i386.c
  532. diff -r source/gutil/freebuf.c ../ingres.ptf/source/gutil/freebuf.c
  533. 18,20d17
  534. < int    freebuf();
  535. < int    markbuf();
  536. < int    seterr();
  537. 22a20,22
  538. 46c46
  539. < int
  540. ---
  541. 68c68
  542. < int
  543. ---
  544. 97c97
  545. < int
  546. ---
  547. diff -r source/gutil/ftoa.c ../ingres.ptf/source/gutil/ftoa.c
  548. 1,2d0
  549. < #include <math.h>
  550. < #include <useful.h>
  551. 8d5
  552. < # define        MAXEXP          40
  553. 36,49d32
  554. < /*
  555. <  * Macros for converting digits to letters and vice versa
  556. <  */
  557. < #define    to_digit(c)    ((c) - '0')
  558. < #define is_digit(c)    ((unsigned)to_digit(c) <= 9)
  559. < #define    to_char(n)    ((n) + '0')
  560. < static char *fcvt();
  561. < static char *ecvt();
  562. < static char *round();
  563. < static char *exponent();
  564. < int
  565. 65,66c48
  566. <         char            buf[MAXEXP];    /*  K.Okamoto  */
  567. <         char      *startp, *endp;
  568. ---
  569. >     extern char    *ecvt(), *fcvt();
  570. 79,82c61
  571. <             startp = buf;
  572. <             endp = buf + sizeof(buf);
  573. <         p = fcvt(value, prec, &expon, &sign, startp, endp);
  574. ---
  575. >         p = fcvt(value, prec, &expon, &sign);
  576. 131,133c110
  577. <             startp = buf;
  578. <             endp = buf + sizeof(buf);
  579. <         p = ecvt(value, prec + 1, &expon, &sign, startp, endp);
  580. ---
  581. >         p = ecvt(value, prec + 1, &expon, &sign);
  582. 167,168c144
  583. < /*    *a++ = '.';           K.Okamoto      */
  584. <         prec++;           /*  K.Okamoto  */
  585. ---
  586. >     *a++ = '.';
  587. 214,485d189
  588. < }
  589. < /*-
  590. <  * Copyright (c) 1990 The Regents of the University of California.
  591. <  * All rights reserved.
  592. <  *
  593. <  * This code is derived from software contributed to Berkeley by
  594. <  * Chris Torek.
  595. <  *
  596. <  * Redistribution and use in source and binary forms, with or without
  597. <  * modification, are permitted provided that the following conditions
  598. <  * are met:
  599. <  * 1. Redistributions of source code must retain the above copyright
  600. <  *    notice, this list of conditions and the following disclaimer.
  601. <  * 2. Redistributions in binary form must reproduce the above copyright
  602. <  *    notice, this list of conditions and the following disclaimer in the
  603. <  *    documentation and/or other materials provided with the distribution.
  604. <  * 3. All advertising materials mentioning features or use of this software
  605. <  *    must display the following acknowledgement:
  606. <  *    This product includes software developed by the University of
  607. <  *    California, Berkeley and its contributors.
  608. <  * 4. Neither the name of the University nor the names of its contributors
  609. <  *    may be used to endorse or promote products derived from this software
  610. <  *    without specific prior written permission.
  611. <  *
  612. <  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  613. <  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  614. <  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  615. <  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  616. <  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  617. <  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  618. <  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  619. <  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  620. <  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  621. <  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  622. <  * SUCH DAMAGE.
  623. <  */
  624. < /*  the following four functions are stolen from the source code of 
  625. <  *  function cvt() in 386bsd itself in /usr/src/lib/libc/stdio/vfprintf.c 
  626. <  *        by  K.Okamoto 
  627. <  */
  628. < char *
  629. < fcvt(number, prec, expon, sign, startp, endp)
  630. <     double number;
  631. <     register int prec;
  632. <     int *expon, *sign;
  633. <         char *startp, *endp;
  634. < {
  635. <     register char *p, *t;
  636. <     register double fract;
  637. <     int expcnt;
  638. <     double integer, tmp;
  639. <         *startp = '\0';
  640. <     expcnt = 0;
  641. <     if (number < 0) {
  642. <         number = -number;
  643. <         *sign = 1;
  644. <     } else
  645. <         *sign = 0;
  646. <     fract = modf(number, &integer);
  647. <     /* get an extra slot for rounding. */
  648. <     t = ++startp;
  649. <     /*
  650. <      * get integer portion of number; put into the end of the buffer; the
  651. <      * .01 is added for modf(356.0 / 10, &integer) returning .59999999...
  652. <      */
  653. <     for (p = endp - 1; integer; ++expcnt) {
  654. <         tmp = modf(integer / 10, &integer);
  655. <         *p-- = to_char((int)((tmp + .01) * 10));
  656. <     }
  657. <     /* reverse integer into beginning of buffer */
  658. <     if (expcnt)
  659. <         for (; ++p < endp; *t++ = *p);
  660. <     else
  661. <         *t++ = '0';
  662. <     /*
  663. <      * if precision required, add in a decimal point.
  664. <      */
  665. <     if (prec )
  666. <         *t++ = '.';
  667. <     /* if requires more precision and some fraction left */
  668. <     if (fract) {
  669. <         if (prec)
  670. <             do {
  671. <                 fract = modf(fract * 10, &tmp);
  672. <                 *t++ = to_char((int)tmp);
  673. <             } while (--prec && fract);
  674. <         if (fract)
  675. <             startp = round(fract, (int *)NULL, startp,
  676. <                 t - 1, (char)0, sign);
  677. <     }
  678. <     for (; prec--; *t++ = '0');
  679. <         *expon = expcnt;
  680. <     return ((char *)(startp));
  681. < }
  682. < char *
  683. < ecvt(number, prec, expon, sign, startp, endp)
  684. <     double number;
  685. <     register int prec;
  686. <     int *expon, *sign;
  687. <         char *startp, *endp;
  688. < {
  689. <     register char *p, *t;
  690. <     register double fract;
  691. <     int expcnt, gformat;
  692. <     double integer, tmp;
  693. <         *startp = '\0';
  694. <     expcnt = gformat = 0;
  695. <     if (number < 0) {
  696. <         number = -number;
  697. <         *sign = 1;
  698. <     } else
  699. <         *sign = 0;
  700. <     fract = modf(number, &integer);
  701. <     /* get an extra slot for rounding. */
  702. <     t = ++startp;
  703. <     /*
  704. <      * get integer portion of number; put into the end of the buffer; the
  705. <      * .01 is added for modf(356.0 / 10, &integer) returning .59999999...
  706. <      */
  707. <     for (p = endp - 1; integer; ++expcnt) {
  708. <         tmp = modf(integer / 10, &integer);
  709. <         *p-- = to_char((int)((tmp + .01) * 10));
  710. <     }
  711. <     if (expcnt) {
  712. <         *t++ = *++p;
  713. <         if (prec)
  714. <             *t++ = '.';
  715. <         /* if requires more precision and some integer left */
  716. <         for (; prec && ++p < endp; --prec)
  717. <             *t++ = *p;
  718. <         /*
  719. <          * if done precision and more of the integer component,
  720. <          * round using it; adjust fract so we don't re-round
  721. <          * later.
  722. <          */
  723. <         if (!prec && ++p < endp) {
  724. <             fract = 0;
  725. <             startp = round((double)0, &expcnt, startp,
  726. <                 t - 1, *p, sign);
  727. <         }
  728. <         /* adjust expcnt for digit in front of decimal */
  729. <         --expcnt;
  730. <     }
  731. <     /* until first fractional digit, decrement exponent */
  732. <     else if (fract) {
  733. <         /* adjust expcnt for digit in front of decimal */
  734. <         for (expcnt = -1;; --expcnt) {
  735. <             fract = modf(fract * 10, &tmp);
  736. <             if (tmp)
  737. <                 break;
  738. <         }
  739. <         *t++ = to_char((int)tmp);
  740. <         if (prec)
  741. <             *t++ = '.';
  742. <     }
  743. <     else {
  744. <         *t++ = '0';
  745. <         if (prec)
  746. <             *t++ = '.';
  747. <     }
  748. <     /* if requires more precision and some fraction left */
  749. <     if (fract) {
  750. <         if (prec)
  751. <             do {
  752. <                 fract = modf(fract * 10, &tmp);
  753. <                     *t++ = to_char((int)tmp);
  754. <             } while (--prec && fract);
  755. <         if (fract)
  756. <             startp = round(fract, &expcnt, startp,
  757. <                 t - 1, (char)0, sign);
  758. <     }
  759. <     /* if requires more precision */
  760. <     for (; prec--; *t++ = '0');
  761. <     /* unless alternate flag, trim any g/G format trailing 0's */
  762. <     if (gformat) {
  763. <         while (t > startp && *--t == '0');
  764. <         if (*t == '.')
  765. <             --t;
  766. <         ++t;
  767. <     }
  768. <     t = exponent(t, expcnt);
  769. <         *expon = expcnt;
  770. <     return ((char *)(startp));
  771. < }
  772. < static char *
  773. < round(fract, exp, start, end, ch, sign)
  774. <     double fract;
  775. <     int *exp;
  776. <     register char *start, *end;
  777. <     char ch;
  778. <         int *sign;
  779. < {
  780. <     double tmp;
  781. <     if (fract)
  782. <         (void)modf(fract * 10, &tmp);
  783. <     else
  784. <         tmp = to_digit(ch);
  785. <     if (tmp > 4)
  786. <         for (;; --end) {
  787. <             if (*end == '.')
  788. <                 --end;
  789. <             if (++*end <= '9')
  790. <                 break;
  791. <             *end = '0';
  792. <             if (end == start) {
  793. <                 if (exp) {    /* e/E; increment exponent */
  794. <                     *end = '1';
  795. <                     ++*exp;
  796. <                 }
  797. <                 else {        /* f; add extra digit */
  798. <                 *--end = '1';
  799. <                 --start;
  800. <                 }
  801. <                 break;
  802. <             }
  803. <         }
  804. <     /* ``"%.3f", (double)-0.0004'' gives you a negative 0. */
  805. <     else if (*sign != 0)
  806. <         for (;; --end) {
  807. <             if (*end == '.')
  808. <                 --end;
  809. <             if (*end != '0')
  810. <                 break;
  811. <             if (end == start)
  812. <                 *sign = 0;
  813. <         }
  814. <     return (start);
  815. < }
  816. < static char *
  817. < exponent(p, exp)
  818. <     register char *p;
  819. <     register int exp;
  820. < {
  821. <     register char *t;
  822. <     char expbuf[MAXEXP];
  823. <     *p++ = 'E';
  824. <     if (exp < 0) {
  825. <         exp = -exp;
  826. <         *p++ = '-';
  827. <     }
  828. <     else
  829. <         *p++ = '+';
  830. <     t = expbuf + MAXEXP;
  831. <     if (exp > 9) {
  832. <         do {
  833. <             *--t = to_char(exp % 10);
  834. <         } while ((exp /= 10) > 9);
  835. <         *--t = to_char(exp);
  836. <         for (; t < expbuf + MAXEXP; *p++ = *t++);
  837. <     }
  838. <     else {
  839. <         *p++ = '0';
  840. <         *p++ = to_char(exp);
  841. <     }
  842. <     return (p);
  843. diff -r source/gutil/syserr.c ../ingres.ptf/source/gutil/syserr.c
  844. 25,26c25,26
  845. < extern    void exit(), abort();
  846. < void    (*ExitFn)()     = exit;
  847. ---
  848. > extern    exit(), abort();
  849. > int    (*ExitFn)()     = exit;
  850. diff -r source/h/func.h ../ingres.ptf/source/h/func.h
  851. 14,17c14,15
  852. < /*    int        (*fn_initfn)();     initialization function */
  853. < /*    int        (*fn_cleanup)(); interrupt cleanup function */
  854. <     void        (*fn_initfn)();    /* initialization function */
  855. <     void        (*fn_cleanup)();/* interrupt cleanup function */
  856. ---
  857. >     int        (*fn_initfn)();    /* initialization function */
  858. >     int        (*fn_cleanup)();/* interrupt cleanup function */
  859. diff -r source/h/ingres.h ../ingres.ptf/source/h/ingres.h
  860. 0a1
  861. 27,28c28
  862. < # ifdef i386                   /*  by   K.Okamoto   */
  863. < /*   # ifndef sun                  by   K.Okamoto   */
  864. ---
  865. > # ifndef    sun
  866. 134c134
  867. < # ifdef VAX   /*  also for i386   by  K.Okamoto */
  868. ---
  869. > # ifdef VAX
  870. 136d135
  871. < /*    c_1    pg2, pg1, pg0, line_id;    K.Okamoto  */
  872. 139d137
  873. < /*    c_1    line_id, pg0, pg1, pg2;    K.Okamoto  */
  874. diff -r source/h/lock.h ../ingres.ptf/source/h/lock.h
  875. 37c37
  876. <                      *    =4 release all locks for pid
  877. ---
  878. >                      *    =release all locks for pid
  879. diff -r source/h/opsys.h ../ingres.ptf/source/h/opsys.h
  880. 0a1,2
  881. > #
  882. diff -r source/h/resp.h ../ingres.ptf/source/h/resp.h
  883. 16c16
  884. <     /* PARM    resp_rval;     the module return value */
  885. ---
  886. >     /* PARM    resp_rval;    /* the module return value */
  887. diff -r source/h/tree.h ../ingres.ptf/source/h/tree.h
  888. 207a208,211
  889. 208a213,216
  890. diff -r source/iutil/Makefile ../ingres.ptf/source/iutil/Makefile
  891. 46c46
  892. < CFLAGS=    -O -I$H -I../ctlmod
  893. ---
  894. > CFLAGS=    -I$H -O -I../ctlmod
  895. diff -r source/iutil/accbuf.c ../ingres.ptf/source/iutil/accbuf.c
  896. 34c34
  897. < extern int    Alockdes;        /* file descriptor for lock device*/
  898. ---
  899. > int        Alockdes;        /* file descriptor for lock device*/
  900. diff -r source/iutil/dblocks.c ../ingres.ptf/source/iutil/dblocks.c
  901. 8d7
  902. 22c21
  903. <     if ( tTf(28,6) ) 
  904. ---
  905. >     if ( tTf(28,6) )
  906. diff -r source/iutil/getservent.c ../ingres.ptf/source/iutil/getservent.c
  907. 8c8
  908. < #include <sccs.h>
  909. ---
  910. > # include    <sccs.h>
  911. 14,19d13
  912. < void        setservent();
  913. < void        endservent();
  914. < struct servent *getservent();
  915. < static char *any();
  916. < static int  myatoi();
  917. 25a20
  918. > static char *any();
  919. 27d21
  920. < void                        /* added by K.Okamoto  */ 
  921. 38d31
  922. < void                      /* added by K.Okamoto  */
  923. diff -r source/iutil/ingresname.c ../ingres.ptf/source/iutil/ingresname.c
  924. 6,8d5
  925. < extern char    *pmove();
  926. < int  ingresname();
  927. 26a24
  928. >     extern char    *pmove();
  929. diff -r source/iutil/initucode.c ../ingres.ptf/source/iutil/initucode.c
  930. 148c148
  931. <         /* (also in initproc for system processes) */
  932. ---
  933. >             /* (also in initproc for system processes) */
  934. 156,176d155
  935. < #ifndef gtty
  936. < #define gtty(fd, argp) ioctl(fd, TIOCGETP, argp)
  937. < #endif
  938. < #ifndef stty
  939. < #define stty(fd, argp) ioctl(fd, TIOCSETP, argp)
  940. < #endif
  941. < int    initucode();
  942. < int    db_lock();
  943. < int    initdbpath();
  944. < extern    void    rubcatch();
  945. < /*------ needless for 386bsd  by  K.Okamoto -------
  946. <     struct    passwd    *getpwnam();
  947. < # ifdef xV7_UNIX
  948. <     extern char    *getenv();
  949. < # endif xV7_UNIX
  950. < -------------------------------------------------*/
  951. < int
  952. 203a183
  953. >     extern        rubcatch();
  954. 206a187,190
  955. >     struct    passwd    *getpwnam();
  956. > # ifdef xV7_UNIX
  957. >     extern char    *getenv();
  958. > # endif xV7_UNIX
  959. 242c226
  960. <     Pathname = (char *)getenv("INGPATH");
  961. ---
  962. >     Pathname = getenv("INGPATH");
  963. 348c332
  964. <     if ((iop = fopen((char *)ztack(Pathname, "/files/users"), "r")) == NULL)
  965. ---
  966. >     if ((iop = fopen(ztack(Pathname, "/files/users"), "r")) == NULL)
  967. 426,427c410
  968. <                 sbufp += smove(field[UF_UCODE], sbufp) + 1;
  969. ---
  970. >         sbufp += smove(field[UF_UCODE], sbufp) + 1;
  971. 510c493
  972. <             i = open((char *)ztack(Dbpath, "/admin"), O_RDONLY);
  973. ---
  974. >             i = open(ztack(Dbpath, "/admin"), O_RDONLY);
  975. 586d568
  976. < int
  977. 600d581
  978. 627d607
  979. < int
  980. diff -r source/iutil/lock.c ../ingres.ptf/source/iutil/lock.c
  981. 13,14d12
  982. < int  start_up_lock_driver();
  983. 30d27
  984. < int
  985. 71c68
  986. <     if ( connect(to_driver, (struct sockaddr *)&addr, sizeof (addr)) == -1 )
  987. ---
  988. >     if ( connect(to_driver,&addr,sizeof (addr)) == -1 )
  989. 79a77,78
  990. 84d82
  991. < /*   ---- deleted by  K.Okamoto  -------------
  992. 107,109d104
  993. < -----------deleted by K.Okamoto  ------------------
  994. < */
  995. \ No newline at end of file
  996. diff -r source/iutil/lockreq.c ../ingres.ptf/source/iutil/lockreq.c
  997. 2c2
  998. < #include <ildr.h>
  999. ---
  1000. > #include "ildr.h"
  1001. 9,10d8
  1002. < int   dolock();
  1003. 21,22d18
  1004. < int
  1005. diff -r source/iutil/null_fn.c ../ingres.ptf/source/iutil/null_fn.c
  1006. 65d64
  1007. < void
  1008. 67a67
  1009. >     return (0);
  1010. diff -r source/iutil/page.c ../ingres.ptf/source/iutil/page.c
  1011. 9,11d8
  1012. < extern struct accbuf    *choose_buf();
  1013. 40d36
  1014. < int
  1015. 49a46,47
  1016. >     extern struct accbuf    *choose_buf();
  1017. >     extern long        lseek();
  1018. 68d65
  1019. diff -r source/iutil/printup.c ../ingres.ptf/source/iutil/printup.c
  1020. 127,129c127
  1021. <                 dbl = (double) value->f4type;
  1022. <             ftoa(dbl, buf, Out_arg.f4width, Out_arg.f4prec, Out_arg.f4style);
  1023. ---
  1024. >             ftoa(value->f4type, buf, Out_arg.f4width, Out_arg.f4prec, Out_arg.f4style);
  1025. diff -r source/iutil/replace.c ../ingres.ptf/source/iutil/replace.c
  1026. 50c50
  1027. < int
  1028. ---
  1029. diff -r source/iutil/rub.c ../ingres.ptf/source/iutil/rub.c
  1030. 45d44
  1031. < void
  1032. diff -r source/iutil/utility.c ../ingres.ptf/source/iutil/utility.c
  1033. 28c28
  1034. < # ifdef VAX     /* also for i386  by  K.Okamoto  */
  1035. ---
  1036. > # ifdef VAX
  1037. diff -r source/libq/IIingres.c ../ingres.ptf/source/libq/IIingres.c
  1038. 42,43c42,43
  1039. <     extern    void    IIresync();
  1040. <     extern    void    *(IIinterrupt)(),    exit();
  1041. ---
  1042. >     extern        IIresync();
  1043. >     extern        *(IIinterrupt)(),    exit();
  1044. diff -r source/libq/IIresync.c ../ingres.ptf/source/libq/IIresync.c
  1045. 18,19c18,19
  1046. < extern    void  exit();
  1047. < void    (*IIinterrupt)() =    exit;
  1048. ---
  1049. > extern    exit();
  1050. > int    (*IIinterrupt)() =    exit;
  1051. 21d20
  1052. < void
  1053. diff -r source/libq/Makefile ../ingres.ptf/source/libq/Makefile
  1054. 7c7
  1055. < INGRES=    /usr/ingres
  1056. ---
  1057. > INGRES=    ../..
  1058. 28c28
  1059. < CFLAGS=    -O -I$H -I../ctlmod
  1060. ---
  1061. > CFLAGS=    -I$H -I../ctlmod -O
  1062. 31a32
  1063. > RANLIB=    ranlib
  1064. diff -r source/monitor/Makefile ../ingres.ptf/source/monitor/Makefile
  1065. 29,30c29
  1066. < #CFLAGS=    -O -I$H  -I../ctlmod
  1067. < CFLAGS=    -I$H  -I../ctlmod
  1068. ---
  1069. > CFLAGS=    -I$H -O -I../ctlmod
  1070. diff -r source/monitor/branch.c ../ingres.ptf/source/monitor/branch.c
  1071. 79,84c79,83
  1072. < /*    if (rewind(Input))
  1073. <  *    {
  1074. <  *        printf("Cannot branch on a terminal\n");
  1075. <  *        return (1);
  1076. <  *    }
  1077. < */
  1078. ---
  1079. >     if (rewind(Input))
  1080. >     {
  1081. >         printf("Cannot branch on a terminal\n");
  1082. >         return (1);
  1083. >     }
  1084. diff -r source/monitor/buf.c ../ingres.ptf/source/monitor/buf.c
  1085. 206c206
  1086. <     extern void    (*ExitFn)();    /* defined in syserr.c */
  1087. ---
  1088. >     extern int    (*ExitFn)();    /* defined in syserr.c */
  1089. diff -r source/monitor/clear.c ../ingres.ptf/source/monitor/clear.c
  1090. 19d18
  1091. <     char f;
  1092. 29c28
  1093. <         clrline(0);  /* removes '\n' following '\g'etc  */
  1094. ---
  1095. >         clrline(0);
  1096. diff -r source/monitor/clrline.c ../ingres.ptf/source/monitor/clrline.c
  1097. 35,36c35,36
  1098. <     Prompt = (c == '\n');
  1099. <     if (!Prompt)              /*  next char != newline K.Okamoto */
  1100. ---
  1101. >     Prompt = c == '\n';
  1102. >     if (!Prompt)
  1103. diff -r source/monitor/expr.c ../ingres.ptf/source/monitor/expr.c
  1104. 266c266
  1105. <       case '\t':
  1106. ---
  1107. >       case '/t':
  1108. diff -r source/monitor/getch.c ../ingres.ptf/source/monitor/getch.c
  1109. 14c14
  1110. < **    EOF (i.e. == '\0') marker.
  1111. ---
  1112. > **    EOF marker.
  1113. 23c23
  1114. <         c = '\0';           /* stands for EOF  */
  1115. ---
  1116. >         c = '\0';
  1117. 26,30c26,27
  1118. <         if (c == EOF)               /*  if (c < 0 )   K.Okamoto  */
  1119. <         c = '\0';               /*  if really EOF(-1)
  1120. <                                         This should be rewrite to permit
  1121. <                     to input 8 bit code  K.Okamoto */
  1122. ---
  1123. >     if (c < 0)
  1124. >         c = '\0';
  1125. 37c34,35
  1126. <         }
  1127. ---
  1128. >     }
  1129. diff -r source/monitor/go.c ../ingres.ptf/source/monitor/go.c
  1130. 30,33d29
  1131. < extern int    fgetc();
  1132. < extern char    *macro();
  1133. < int
  1134. 38a35
  1135. >     extern int    fgetc();
  1136. 39a37
  1137. >     extern char    *macro();
  1138. diff -r source/monitor/include.c ../ingres.ptf/source/monitor/include.c
  1139. 24,26d23
  1140. < extern char        *getfilenm();
  1141. 33a31
  1142. >     extern char        *getfilenm();
  1143. 36c34
  1144. <     if (f == 0)               /* stands for NULL pointer */
  1145. ---
  1146. >     if (f == 0)
  1147. diff -r source/monitor/monitor.c ../ingres.ptf/source/monitor/monitor.c
  1148. 7d6
  1149. < # include       <sys/ioctl.h>      /*  K.Okamoto  */
  1150. 97c96
  1151. <         0
  1152. ---
  1153. >     0
  1154. 100,104d98
  1155. < extern jmp_buf    CmReset;
  1156. < extern    int    error();
  1157. < extern char    *Proc_name;
  1158. < extern int    RubLevel;
  1159. < extern    void    rubcatch();
  1160. 106,107d99
  1161. < int
  1162. 109c101
  1163. < bool    recurs;            /* K.Okamoto Is this a recursive call? */
  1164. ---
  1165. > int    recurs;            /* Is this a recursive call? */
  1166. 112c104
  1167. <         time_t          *timevec;
  1168. ---
  1169. >     int        timevec[2];
  1170. 114c106,110
  1171. <         pid_t           pid;
  1172. ---
  1173. >     extern jmp_buf    CmReset;
  1174. >     extern        error();
  1175. >     extern char    *Proc_name;
  1176. >     extern int    RubLevel;
  1177. >     extern        rubcatch();
  1178. 117,118c113
  1179. <       setjmp(CmReset);
  1180. ---
  1181. >         setjmp(CmReset);
  1182. 130d124
  1183. 132a127
  1184. >             
  1185. 213c208
  1186. <                 prompt("");
  1187. ---
  1188. >                 prompt(0);
  1189. 218c213
  1190. <                 prompt("");
  1191. ---
  1192. >                 prompt(0);
  1193. 223c218
  1194. <                 prompt("");
  1195. ---
  1196. >                 prompt(0);
  1197. 236a232
  1198. 298c294
  1199. <     *p = '\0';
  1200. ---
  1201. >     *p = 0;
  1202. 317,318c313
  1203. <     prompt(0);     /* if Prompt = !GiveEof == TRUE, show prompt and 
  1204. <               then fflush(stdout).    K.Okamoto      */
  1205. ---
  1206. >     prompt(0);
  1207. 320,323c315,316
  1208. <         clear(0);   /* Qbname -->truncated Qryiop, and show 
  1209. <                  prompt 'go'  Autoclear = Notnull = 0,
  1210. <                  K.Okamoto  */
  1211. <     fputc(c, Qryiop);
  1212. ---
  1213. >         clear(0);
  1214. >     putc(c, Qryiop);
  1215. diff -r source/monitor/monitor.h ../ingres.ptf/source/monitor/monitor.h
  1216. 41c41
  1217. < /* include support stuff */
  1218. ---
  1219. > /* \include support stuff */
  1220. diff -r source/monitor/prompt.c ../ingres.ptf/source/monitor/prompt.c
  1221. 22c22
  1222. <     char    *msg;
  1223. ---
  1224. > char    *msg;
  1225. diff -r source/monitor/quit.c ../ingres.ptf/source/monitor/quit.c
  1226. 43,50d42
  1227. < extern void    (*ExitFn)();
  1228. < extern void    exit();
  1229. < extern int    sys_nerr;
  1230. < extern char    *sys_errlist[];
  1231. < extern char    SysIdent[];
  1232. < void
  1233. 58a51,54
  1234. >     extern int    (*ExitFn)();
  1235. >     extern        exit();
  1236. >     extern int    sys_nerr;
  1237. >     extern char    *sys_errlist[];
  1238. 59a56
  1239. >     extern char    SysIdent[];
  1240. Only in source/monitor: test.c
  1241. Only in source/monitor: test1.c
  1242. diff -r source/monitor/ttymon.c ../ingres.ptf/source/monitor/ttymon.c
  1243. 51,58c51,54
  1244. < extern  char    *Usercode;
  1245. < int    tm_mon();
  1246. < void    tm_init();
  1247. < void    tm_intr();
  1248. < extern    void    quit();
  1249. < extern  void    (*ExitFn)();
  1250. < extern  char    *getufield();
  1251. < extern  char    *mcall();
  1252. ---
  1253. > extern char    *Usercode;
  1254. > extern        tm_mon();
  1255. > extern        tm_init();
  1256. > extern        tm_intr();
  1257. 60,63d55
  1258. < extern  int    Equel;
  1259. < extern  jmp_buf    CmReset;
  1260. < extern  jmp_buf    GoJmpBuf;
  1261. < extern  char    SysIdent[];
  1262. 79,81d70
  1263. < struct sgttyb gttydummy;      /*  K.Okamoto  */
  1264. < void
  1265. 87a77,79
  1266. >     extern        quit();
  1267. >     extern int    (*ExitFn)();
  1268. >     extern int    Equel;
  1269. 88a81,83
  1270. >     extern char    *getufield();
  1271. >     extern jmp_buf    CmReset;
  1272. >     extern char    SysIdent[];
  1273. 100,101c95,96
  1274. <     ExitFn = quit;       /*  this points the exit function as quit() in this file  */
  1275. <     set_si_buf();        /*  set stdin buffered  */
  1276. ---
  1277. >     ExitFn = quit;
  1278. >     set_si_buf();
  1279. 120c115
  1280. <     if (Nodayfile == 0 && (Qryiop = fopen((char *)ztack(ztack(Pathname, "/files/dayfile"), VERSION), "r")) != NULL)
  1281. ---
  1282. >     if (Nodayfile == 0 && (Qryiop = fopen(ztack(ztack(Pathname, "/files/dayfile"), VERSION), "r")) != NULL)
  1283. 157c152
  1284. <     **    THIS CODE IS A KLUDGE!!!
  1285. ---
  1286. >     **    THIS CODE IS A CLUDGE!!!
  1287. 167c162
  1288. <     setbuf(stdin, NULL);   /* set stdin non-buffered */
  1289. ---
  1290. >     setbuf(stdin, NULL);
  1291. 179d173
  1292. < void
  1293. 191c185
  1294. <     lseek(stdin->_file, 0L, SEEK_END);
  1295. ---
  1296. >     lseek(stdin->_file, 0L, 2);
  1297. 218d211
  1298. < int
  1299. 230a224
  1300. >     extern char    *mcall();
  1301. 231a226
  1302. >     extern jmp_buf    GoJmpBuf;
  1303. 283c278
  1304. <         *p = '\0';
  1305. ---
  1306. >         *p = 0;
  1307. diff -r source/ovqp/Makefile ../ingres.ptf/source/ovqp/Makefile
  1308. 13,14c13,14
  1309. < AR=    ar
  1310. < ARFLAGS=-rvu
  1311. ---
  1312. > AR=    -ar
  1313. > ARFLAGS=rvu
  1314. diff -r source/ovqp/findsimps.c ../ingres.ptf/source/ovqp/findsimps.c
  1315. 280,281c280,281
  1316. < *cpsym(constv, len, op)
  1317. < struct symbol    *constv;
  1318. ---
  1319. > *cpsym(const, len, op)
  1320. > struct symbol    *const;
  1321. 297c297
  1322. <     cp = constv->value.sym_data.c0type;
  1323. ---
  1324. >     cp = const->value.sym_data.c0type;
  1325. 352,353c352,353
  1326. < add_simp(constv, rel, attno)
  1327. < struct symbol    *constv;
  1328. ---
  1329. > add_simp(const, rel, attno)
  1330. > struct symbol    *const;
  1331. 365c365
  1332. <     s->constv = constv;
  1333. ---
  1334. >     s->const = const;
  1335. 385c385
  1336. <     prsym(s->constv);
  1337. ---
  1338. >     prsym(s->const);
  1339. diff -r source/ovqp/key.c ../ingres.ptf/source/ovqp/key.c
  1340. 55c55
  1341. <                     k->keysym = s->constv;
  1342. ---
  1343. >                     k->keysym = s->const;
  1344. 62c62
  1345. <                         prsym(s->constv);
  1346. ---
  1347. >                         prsym(s->const);
  1348. 126c126
  1349. <                     l->keysym = s->constv;
  1350. ---
  1351. >                     l->keysym = s->const;
  1352. 142c142
  1353. <                     h->keysym = s->constv;
  1354. ---
  1355. >                     h->keysym = s->const;
  1356. 237c237
  1357. <                         low->keysym = s->constv;
  1358. ---
  1359. >                         low->keysym = s->const;
  1360. 248c248
  1361. <                         high->keysym = s->constv;
  1362. ---
  1363. >                         high->keysym = s->const;
  1364. 254c254
  1365. <                         prsym(s->constv);
  1366. ---
  1367. >                         prsym(s->const);
  1368. diff -r source/ovqp/startovqp.c ../ingres.ptf/source/ovqp/startovqp.c
  1369. 23c23
  1370. <         extern    void   flptexcep();
  1371. ---
  1372. >     extern    flptexcep();
  1373. 31c31
  1374. <     signal(SIGFPE,  flptexcep);
  1375. ---
  1376. >     signal(SIGFPE, (int) flptexcep);
  1377. 37d36
  1378. < void
  1379. 45d43
  1380. < /*      temporaly deleted by K.Okamoto because of gcc 1.39's double
  1381. 65,66d62
  1382. < -----------------temporaly deleted-------
  1383. < */
  1384. \ No newline at end of file
  1385. diff -r source/parser/Makefile ../ingres.ptf/source/parser/Makefile
  1386. 34c34
  1387. < CFLAGS=    -O -I$H  -DDISTRIB
  1388. ---
  1389. > CFLAGS=    -O -I$H
  1390. 63,70d62
  1391. < #for non-distributed database
  1392. < #grammar.c: grammar.y
  1393. < #    grep -v "DDD" grammar.y > grammar.z
  1394. < #    $(YACC) $(YFLAGS) grammar.z
  1395. < #    mv y.tab.c grammar.c
  1396. < #    rm -f grammar.z
  1397. < #for distributed database
  1398. 72c64,65
  1399. <     $(YACC) $(YFLAGS) grammar.y
  1400. ---
  1401. >     grep -v "DDD" grammar.y > grammar.z
  1402. >     $(YACC) $(YFLAGS) grammar.z
  1403. 73a67
  1404. >     rm -f grammar.z
  1405. diff -r source/parser/att_fcn.c ../ingres.ptf/source/parser/att_fcn.c
  1406. 21c21
  1407. < struct atstash    Fakesid =
  1408. ---
  1409. > struct atstash    Fakesid
  1410. diff -r source/parser/control.c ../ingres.ptf/source/parser/control.c
  1411. 336c336
  1412. <     extern int    Ingerr;
  1413. ---
  1414. >     extern int    Ing_err;
  1415. 371,372d370
  1416. <     extern int    Equel;
  1417. <     extern int    Err_fnd;
  1418. diff -r source/parser/grammar.y ../ingres.ptf/source/parser/grammar.y
  1419. 30c30
  1420. < # define    YYDEBUG    1
  1421. ---
  1422. > # define    YYDEBUG
  1423. 53d52
  1424. < extern int                      Err_current;
  1425. Only in source/parser: grammar.z
  1426. diff -r source/parser/par_init.c ../ingres.ptf/source/parser/par_init.c
  1427. 16d15
  1428. < void
  1429. diff -r source/parser/parser.c ../ingres.ptf/source/parser/parser.c
  1430. 16c16
  1431. < extern void        par_init();
  1432. ---
  1433. > extern int        par_init();
  1434. diff -r source/parser/tree.c ../ingres.ptf/source/parser/tree.c
  1435. 757d756
  1436. <     extern DELIMLIST    *Delimhead;
  1437. diff -r source/qrymod/d_integ.c ../ingres.ptf/source/qrymod/d_integ.c
  1438. 38,39c38
  1439. < extern    void     null_fn();
  1440. < extern          d_integ();
  1441. ---
  1442. > extern        d_integ(), null_fn();
  1443. diff -r source/qrymod/d_prot.c ../ingres.ptf/source/qrymod/d_prot.c
  1444. 76,77c76
  1445. < extern    void    null_fn();
  1446. < extern          d_prot();
  1447. ---
  1448. > extern        d_prot(), null_fn();
  1449. diff -r source/qrymod/d_view.c ../ingres.ptf/source/qrymod/d_view.c
  1450. 45,46c45
  1451. < extern    void    null_fn();
  1452. < extern          d_view();
  1453. ---
  1454. > extern        d_view(), null_fn();
  1455. diff -r source/qrymod/qrymod.c ../ingres.ptf/source/qrymod/qrymod.c
  1456. 36,37c36
  1457. < extern    qrymod();
  1458. < extern  void     qm_init(), null_fn();
  1459. ---
  1460. > extern    qrymod(), qm_init(), null_fn();
  1461. 56c55
  1462. < void
  1463. ---
  1464. 107c106
  1465. < int
  1466. ---
  1467. diff -r source/support/Makefile ../ingres.ptf/source/support/Makefile
  1468. 11c11
  1469. < SYSBIN=    /usr/local/bin
  1470. ---
  1471. > SYSBIN=    /usr/local
  1472. 19c19
  1473. <     demodb.sh initsocket.c ildr.c ingconv.q
  1474. ---
  1475. >     demodb.sh initsocket.c ildr.c ingconv.q 
  1476. 28c28,29
  1477. < LIBS3=  externs.o $(DBULIB) $(IUTIL) $(CTLMOD) $(GUTIL)
  1478. ---
  1479. > LIBS4=    $(DBULIB) $(IUTIL) $(GUTIL) $(CTLMOD)
  1480. > LIBS4=  externs.o $(DBULIB) $(IUTIL) $(CTLMOD) $(GUTIL) $(IUTIL)
  1481. 30c31
  1482. < CFLAGS=    -O -I$H -I../ctlmod #-DDEBUG
  1483. ---
  1484. > CFLAGS=    -O -I$H -I../ctlmod
  1485. 67,68c68,69
  1486. < creatdb: creatdb.o error.o prvect.o $(LIBS3)
  1487. <     $(CC) $(LDFLAGS) creatdb.o error.o prvect.o $(LIBS3) ../iutil/closecat.o -lm -o creatdb
  1488. ---
  1489. > creatdb: creatdb.o error.o prvect.o $(LIBS4)
  1490. >     $(CC) $(LDFLAGS) creatdb.o error.o prvect.o $(LIBS4) -lm -o creatdb
  1491. 72,73c73,74
  1492. < destroydb: destroydb.o $(LIBS3)
  1493. <     $(CC) $(LDFLAGS) destroydb.o $(LIBS3) ../iutil/closecat.o -lm -o destroydb
  1494. ---
  1495. > destroydb: destroydb.o $(LIBS4)
  1496. >     $(CC) $(LDFLAGS) destroydb.o $(LIBS4) -lm -o destroydb
  1497. 77,78c78,79
  1498. < helpr:    helpr.o error.o prvect.o $(LIBS3)
  1499. <     $(CC) $(LDFLAGS) helpr.o error.o prvect.o $(LIBS3) ../iutil/closecat.o -lm -o helpr
  1500. ---
  1501. > helpr:    helpr.o error.o prvect.o $(LIBS4) 
  1502. >     $(CC) $(LDFLAGS) helpr.o error.o prvect.o $(LIBS4) -lm -o helpr
  1503. 96c97
  1504. <     $(CC) $(CFLAGS) -o ingreslock ildr.o initsocket.o
  1505. ---
  1506. >     $(CC) $(CFLAGS) -o ingreslock ildr.o initsocket.o 
  1507. 105,106c106,107
  1508. < printr: printr.o error.o prvect.o $(LIBS3)
  1509. <     $(CC) $(LDFLAGS) printr.o error.o prvect.o $(LIBS3) ../iutil/closecat.o -lm -o printr
  1510. ---
  1511. > printr: printr.o error.o prvect.o $(LIBS4)
  1512. >     $(CC) $(LDFLAGS) printr.o error.o prvect.o $(LIBS4) -lm -o printr
  1513. 110,111c111,112
  1514. < purge: purge.o subs.o error.o $(LIBS3)
  1515. <     $(CC) $(LDFLAGS) purge.o subs.o error.o $(LIBS3) -lm  -o purge
  1516. ---
  1517. > purge: purge.o subs.o error.o $(LIBS4)
  1518. >     $(CC) $(LDFLAGS) purge.o subs.o error.o $(LIBS4) -lm  -o purge
  1519. 115,116c116,117
  1520. < restore: restore.o subs.o error.o $(LIBS3)
  1521. <     $(CC) $(LDFLAGS) restore.o subs.o error.o $(LIBS3) -lm -o restore
  1522. ---
  1523. > restore: restore.o subs.o error.o $(LIBS4)
  1524. >     $(CC) $(LDFLAGS) restore.o subs.o error.o $(LIBS4) -lm -o restore
  1525. diff -r source/support/copydb.q ../ingres.ptf/source/support/copydb.q
  1526. 16c16
  1527. < ##  char    Usercode[100];
  1528. ---
  1529. > ##char    Usercode[100];
  1530. 20c20
  1531. < extern    void    (*ExitFn)();
  1532. ---
  1533. > extern    int    (*ExitFn)();
  1534. 51d50
  1535. < void
  1536. 104c103
  1537. <     if ((Ifile = fopen((char *)ztack(path,"/copy.in"), "w")) == NULL)
  1538. ---
  1539. >     if ((Ifile = fopen(ztack(path,"/copy.in"), "w")) == NULL)
  1540. 106c105
  1541. <     if ((Ofile = fopen((char *)ztack(path,"/copy.out"), "w")) == NULL)
  1542. ---
  1543. >     if ((Ofile = fopen(ztack(path,"/copy.out"), "w")) == NULL)
  1544. diff -r source/support/creatdb.c ../ingres.ptf/source/support/creatdb.c
  1545. 0a1
  1546. 11d11
  1547. < # include       <ctlmod.h>
  1548. 15,46d14
  1549. < void rubproc();
  1550. < int  readdbtemp();
  1551. < int  getstat();
  1552. < int  roctal();
  1553. < int  getname();
  1554. < int  makedb();
  1555. < int  makeadmin();
  1556. < int  makefile();
  1557. < int  makereln();
  1558. < int  check();
  1559. < int  *flaglkup();
  1560. < int  flagval();
  1561. < int  changedb();
  1562. < int  readadmin();
  1563. < int  readdbtemp();
  1564. < extern    char    *ztack();
  1565. < extern  int     initucode();
  1566. < extern  int     acc_init();
  1567. < extern  int     getequal();
  1568. < extern  int     bequal();
  1569. < extern  int     sequal();
  1570. < extern  int     closer();
  1571. < extern  int     ingresname();
  1572. < extern  int     create();
  1573. < extern  int     opencatalog();
  1574. < extern  int     clearkeys();
  1575. < extern  int     setkey();
  1576. < extern  int     checkadmin();
  1577. < extern  int     replace();
  1578. 168,177d135
  1579. < struct _cm_t    Cm;        /* the system topography map */
  1580. < struct _ctx_t    Ctx;        /* the current context */
  1581. < int        Syncs[CM_MAXPROC];/* expected SYNC's from each proc */
  1582. < /* General System Information */
  1583. <   jmp_buf        CmReset;    /* restart addr on interrupt */
  1584. < # ifdef xMONITOR
  1585. <  struct monitor    CmMonBuf;    /* monitor buffer for CM overhead */
  1586. < # endif xMONITOR
  1587. 178a137
  1588. 183,190c142,143
  1589. < /*  extern DESC    Reldes;        */
  1590. < DESC Reldes;
  1591. < /*  extern DESC    Attdes;        */
  1592. < DESC Attdes;
  1593. < /*   extern struct admin    Admin;      */
  1594. < extern int        errno;
  1595. < extern char        *Parmvect[];
  1596. < extern char        *Flagvect[];
  1597. ---
  1598. > extern DESC    Reldes;
  1599. > extern DESC    Attdes;
  1600. 198d150
  1601. 205d156
  1602. 211a163
  1603. 218a171,172
  1604. >     extern struct admin    Admin;
  1605. >     extern int        errno;
  1606. 227a182,183
  1607. >     extern char        *Parmvect[];
  1608. >     extern char        *Flagvect[];
  1609. 229c185,188
  1610. ---
  1611. >     int            *flaglkup();
  1612. >     char            *ztack();
  1613. >     extern char        *rindex();
  1614. > # ifdef    rewinddir
  1615. 231a191,194
  1616. > # else    rewinddir
  1617. >     struct    dir        direct;
  1618. > # endif    rewinddir
  1619. 251,252d213
  1620. <             break;
  1621. 354a316
  1622. 356a319,320
  1623. > # ifdef    rewinddir
  1624. 365a330,342
  1625. > # else    rewinddir
  1626. >             /* make certain that it is empty */
  1627. >             freopen(".", "r", stdin);
  1628. >             /* Skip "." and ".." entries */
  1629. >             fread(&direct, sizeof (struct dir), 1, stdin);
  1630. >             fread(&direct, sizeof (struct dir), 1, stdin);
  1631. >             while ( fread(&direct, sizeof (struct dir), 1, stdin) != EOF)
  1632. >             {
  1633. >                 if ( direct.d_ino != 0)
  1634. >                     syserr(0, "%s is not empty", database);
  1635. >             }
  1636. > # endif    rewinddir
  1637. 390c367
  1638. <             *(p = (char *)rindex(Dbpath, '/')) = '\0';
  1639. ---
  1640. >             *(p = rindex(Dbpath, '/')) = '\0';
  1641. 491c468
  1642. < void
  1643. ---
  1644. 552c529
  1645. < int
  1646. ---
  1647. 692c669
  1648. < int
  1649. ---
  1650. 813c790
  1651. < int
  1652. ---
  1653. 865c842
  1654. < int
  1655. ---
  1656. 938c915
  1657. < int
  1658. ---
  1659. 1001c978,980
  1660. < int
  1661. ---
  1662. 1077,1078c1056,1057
  1663. < v*/
  1664. < int
  1665. ---
  1666. > */
  1667. 1122c1101
  1668. < int
  1669. ---
  1670. 1162c1141
  1671. < int
  1672. ---
  1673. 1302c1281
  1674. < int
  1675. ---
  1676. 1391c1370
  1677. < int
  1678. ---
  1679. 1498c1477
  1680. < int
  1681. ---
  1682. Only in source/support: demo
  1683. diff -r source/support/destroydb.c ../ingres.ptf/source/support/destroydb.c
  1684. 7d6
  1685. < # include       <ctlmod.h>
  1686. 26,38d24
  1687. < struct _cm_t    Cm;        /* the system topography map */
  1688. < struct _ctx_t    Ctx;        /* the current context */
  1689. < int        Syncs[CM_MAXPROC];/* expected SYNC's from each proc */
  1690. < /* General System Information */
  1691. < jmp_buf        CmReset;    /* restart addr on interrupt */
  1692. < # ifdef xMONITOR
  1693. < struct monitor    CmMonBuf;    /* monitor buffer for CM overhead */
  1694. < # endif xMONITOR
  1695. 57a44
  1696. > # ifdef    rewinddir
  1697. 58a46,48
  1698. > # else    rewinddir
  1699. >     FILE        *iop;
  1700. > # endif    rewinddir
  1701. 153a144
  1702. > # ifdef    rewinddir
  1703. 157a149,155
  1704. > # else    rewinddir
  1705. >     iop = fopen(".", "r");
  1706. >     if (iop == NULL)
  1707. >         syserr("Cannot open dot in %s", Dbpath);
  1708. >     clean(iop);
  1709. >     fclose(iop);
  1710. > # endif    rewinddir
  1711. 177c175,176
  1712. < int
  1713. ---
  1714. > # ifdef    rewinddir
  1715. 199a199,214
  1716. > # else    rewinddir
  1717. > clean(f)
  1718. > register FILE    *f;
  1719. > {
  1720. >     struct direc
  1721. >     {
  1722. >         struct direct    d;
  1723. >         char        null;
  1724. >     };
  1725. >     struct direc    cur;
  1726. > #    ifdef xSTR1
  1727. >     if (tTf(2, 0))
  1728. >         printf("clean: ");
  1729. > #    endif
  1730. 200a216,239
  1731. >     cur.null = 0;
  1732. >     /* skip "." and ".." entries */
  1733. >     fread(&cur, sizeof cur.d, 1, f);
  1734. >     fread(&cur, sizeof cur.d, 1, f);
  1735. >     /* scan directory */
  1736. >     while (fread(&cur, sizeof cur.d, 1, f) > 0)
  1737. >     {
  1738. >         /* skip null entries */
  1739. >         if (cur.d.d_ino == 0)
  1740. >             continue;
  1741. > #        ifdef xSTR1
  1742. >         if (tTf(2, 1))
  1743. >             printf("unlinking %s\n", cur.d.d_name);
  1744. > #        endif
  1745. >         unlink(cur.d.d_name);
  1746. >     }
  1747. > }
  1748. > # endif    rewinddir
  1749. 205d243
  1750. < void
  1751. 210d247
  1752. diff -r source/support/externs.c ../ingres.ptf/source/support/externs.c
  1753. 12d11
  1754. < int     QbufSize = sizeof Qbuf;
  1755. diff -r source/support/helpr.c ../ingres.ptf/source/support/helpr.c
  1756. 7d6
  1757. < # include       <ctlmod.h>
  1758. 12,21d10
  1759. < struct _cm_t    Cm;        /* the system topography map */
  1760. < struct _ctx_t    Ctx;        /* the current context */
  1761. < int        Syncs[CM_MAXPROC];/* expected SYNC's from each proc */
  1762. < /* General System Information */
  1763. < jmp_buf        CmReset;    /* restart addr on interrupt */
  1764. < # ifdef xMONITOR
  1765. < struct monitor    CmMonBuf;    /* monitor buffer for CM overhead */
  1766. < # endif xMONITOR
  1767. 23,24d11
  1768. 214c201
  1769. < void
  1770. ---
  1771. 219d205
  1772. diff -r source/support/ildr.c ../ingres.ptf/source/support/ildr.c
  1773. 32,48d31
  1774. < extern  int     init_sokeet();
  1775. < int             new_proc();
  1776. < int             ilwrite();
  1777. < int             ilrma();
  1778. < int             set_lock();
  1779. < int             send_info();
  1780. < int             wait_on();
  1781. < int             wakeup();
  1782. < int             close_up();
  1783. < void            abnormal();
  1784. < static  int     ilunique();
  1785. < static  int     ilfind();
  1786. < static  int     ilrm();
  1787. < static  int     ilenter();
  1788. < static  int     ilcomp();
  1789. < static  int     ilclose();
  1790. 65c48
  1791. <     void        abnormal();        /* error function */
  1792. ---
  1793. >     int        abnormal();        /* error function */
  1794. 67c50
  1795. <         struct timeval        tv;               /* added by K.Okamoto  */
  1796. ---
  1797. 87,89c70,72
  1798. <         signal(i, abnormal);
  1799. <            signal(SIGPIPE,SIG_IGN);    /* ignore this one, in case a process simply dies in mid stride */
  1800. <         Prog_name = *av;
  1801. ---
  1802. >         signal(i,abnormal);
  1803. >     signal(SIGPIPE,SIG_IGN);    /* ignore this one, in case a process simply dies in mid stride */
  1804. >     Prog_name = *av;
  1805. 103,104d85
  1806. <         tv.tv_sec = 0;
  1807. <         tv.tv_usec = 0; 
  1808. 116,118d96
  1809. <         num_des = select(NOFILE,&read_fd,0,0,0);
  1810. 120,122d97
  1811. < /*
  1812. <         while ( (num_des = select(NOFILE,&read_fd,NULL,NULL,&tv)) == 0 )
  1813. < */
  1814. 132,133d106
  1815. 143c116
  1816. <             ** without tellng us. We go to a function to figure
  1817. ---
  1818. >             ** with out tellng us. We go to a function to figure
  1819. 170d142
  1820. < int
  1821. 179c151
  1822. <     if ( (fd = accept(From_server,(struct sockaddr *)&addr,&len)) != -1 )
  1823. ---
  1824. >     if ( (fd = accept(From_server,&addr,&len)) != -1 )
  1825. 182c154
  1826. <         ioctl(fd,FIONBIO,&to_ioctl);   /* set sockets to nonblocking */
  1827. ---
  1828. >         ioctl(fd,FIONBIO,&to_ioctl);
  1829. 195c167
  1830. < int
  1831. ---
  1832. 339d310
  1833. 346,347c317
  1834. < static int
  1835. ---
  1836. > static
  1837. 378c348
  1838. < static int
  1839. ---
  1840. > static
  1841. 403,404c373
  1842. < static int
  1843. ---
  1844. > static
  1845. 439d407
  1846. < int
  1847. 458,459c426
  1848. < static int
  1849. ---
  1850. > static
  1851. 501,502c468
  1852. < static int
  1853. ---
  1854. > static
  1855. 525,526c491
  1856. < static int
  1857. ---
  1858. > static
  1859. 552,553d516
  1860. < int
  1861. 600,601d562
  1862. < int
  1863. 613c574
  1864. <     if ( select(NOFILE,NULL,&wdes,NULL,&time) != 1 )
  1865. ---
  1866. >     if ( select(NOFILE,0,&wdes,0,&time) != 1 )
  1867. 642,643d602
  1868. < int
  1869. 664,665d622
  1870. < int
  1871. 694,695d650
  1872. < void
  1873. 702c657
  1874. <     printf("DRIVER: error Signal No. = %d, restarting\n",sig);
  1875. ---
  1876. >     printf("DRIVER: error %d, restarting\n",sig);
  1877. 705,706c660
  1878. < /*    execl("/etc/lock_driver","lock_driver","restart",0);   */
  1879. <     execl("/etc/ingreslock","lock_driver","restart",0);
  1880. ---
  1881. >     execl("/etc/lock_driver","lock_driver","restart",0);
  1882. 708c662
  1883. <     execlp("ingreslock","lock_driver","restart",0);
  1884. ---
  1885. >     execlp("lock_driver","lock_driver","restart",0);
  1886. 716,717d669
  1887. < int
  1888. diff -r source/support/ingres.y ../ingres.ptf/source/support/ingres.y
  1889. 162a163
  1890. 667,668c668
  1891. <             if(Alockdes >= 3)      /*  added by  K.Okamoto   */
  1892. <                 close(Alockdes);
  1893. ---
  1894. >             close(Alockdes);
  1895. 680a681
  1896. 685d685
  1897. 1063c1063
  1898. <     register proc_t      *pp;
  1899. ---
  1900. >     register proc_t        *pp;
  1901. 1157d1156
  1902. <     extern int  Status;
  1903. 1274c1273
  1904. <     register proc_t     *pp;
  1905. ---
  1906. >     register proc_t        *pp;
  1907. 1349c1348
  1908. <     register proc_t     *pp;
  1909. ---
  1910. >     register proc_t        *pp;
  1911. diff -r source/support/initsocket.c ../ingres.ptf/source/support/initsocket.c
  1912. 13,14d12
  1913. < int    init_socket();
  1914. 19d16
  1915. < int
  1916. 25,28d21
  1917. < #define notdef
  1918. 37c30
  1919. < #ifndef  DEBUG
  1920. ---
  1921. > #ifndef    DEBUG
  1922. 69,71c62
  1923. < /*    bcopy(myhost->h_addr,(char *)&addr.sin_addr,myhost->h_length);    */
  1924. <     bcopy(myhost->h_addr,(char *)&addr.sin_addr.s_addr,myhost->h_length);
  1925. ---
  1926. >     bcopy(myhost->h_addr,(char *)&addr.sin_addr,myhost->h_length);
  1927. 76c67
  1928. <     if ( bind(from_socket,(struct sockaddr_in *)&addr,len) == -1 )
  1929. ---
  1930. >     if ( bind(from_socket,&addr,len) == -1 )
  1931. 82a74
  1932. 88c80
  1933. <         ioctl(from_socket,FIONBIO,&to_ioctl);   /* set socket to nonblocking */
  1934. ---
  1935. >     ioctl(from_socket,FIONBIO,&to_ioctl);
  1936. 91,95d82
  1937. diff -r source/support/printadmin.c ../ingres.ptf/source/support/printadmin.c
  1938. 84c84
  1939. < void
  1940. ---
  1941. 89d88
  1942. diff -r source/support/printr.c ../ingres.ptf/source/support/printr.c
  1943. 7d6
  1944. < # include       <ctlmod.h>
  1945. 12,28d10
  1946. < struct _cm_t    Cm;        /* the system topography map */
  1947. < struct _ctx_t    Ctx;        /* the current context */
  1948. < int        Syncs[CM_MAXPROC];/* expected SYNC's from each proc */
  1949. < /* General System Information */
  1950. < char        *Proc_name;    /* the 'name' of the currently running proc */
  1951. < char        *Fileset;    /* a unique string to make filenames from */
  1952. < char        *Database;    /* the name of the current database */
  1953. < char        *Usercode;    /* the code of the current user */
  1954. < char        *Pathname;    /* the pathname of the root of INGRES */
  1955. < int        Equel;        /* set if running an Equel program */
  1956. < int        RubLevel;    /* rubout level, -1 if ignored */
  1957. < jmp_buf        CmReset;    /* restart addr on interrupt */
  1958. < extern struct out_arg    Out_arg;    /* output arguments */
  1959. < # ifdef xMONITOR
  1960. < struct monitor    CmMonBuf;    /* monitor buffer for CM overhead */
  1961. < # endif xMONITOR
  1962. 30d11
  1963. 39a21
  1964. >     extern struct out_arg    Out_arg;
  1965. 251c233,234
  1966. < void
  1967. ---
  1968. diff -r source/support/prvect.c ../ingres.ptf/source/support/prvect.c
  1969. 74,75c74
  1970. < /*            printf("\%o", *p++);        modified by K.O.   */
  1971. <             printf("%o", *p++);
  1972. ---
  1973. >             printf("\%o", *p++);
  1974. diff -r source/support/purge.c ../ingres.ptf/source/support/purge.c
  1975. 9d8
  1976. < # include       <ctlmod.h>
  1977. 48,57d46
  1978. < struct _cm_t    Cm;        /* the system topography map */
  1979. < struct _ctx_t    Ctx;        /* the current context */
  1980. < int        Syncs[CM_MAXPROC];/* expected SYNC's from each proc */
  1981. < /* General System Information */
  1982. < jmp_buf        CmReset;    /* restart addr on interrupt */
  1983. < # ifdef xMONITOR
  1984. < struct monitor    CmMonBuf;    /* monitor buffer for CM overhead */
  1985. < # endif xMONITOR
  1986. 64,65d52
  1987. < long        Today;
  1988. < short        tTdbu[100];
  1989. 69,72c56,58
  1990. < extern void    (*ExitFn)();
  1991. < extern char    *getnxtdb();
  1992. < extern void    null_fn();
  1993. ---
  1994. > long        Today;
  1995. > short        tTdbu[100];
  1996. > extern int    (*ExitFn)();
  1997. 80a67,68
  1998. >     extern char    *getnxtdb();
  1999. >     extern int    null_fn();
  2000. 104c92
  2001. < void
  2002. ---
  2003. 110a99,100
  2004. 122a113,115
  2005. > #ifndef rewinddir
  2006. > typedef    DIR    FILE;
  2007. > #endif
  2008. 140a134,136
  2009. > #ifndef rewinddir
  2010. >     char            fnambuf[DIRSIZ + 1];
  2011. > #endif
  2012. 231a228,229
  2013. > #ifdef rewinddir
  2014. 234a233,240
  2015. > #else rewinddir
  2016. >         strncpy(fnambuf, dp->d_name, DIRSIZ);
  2017. >         fnambuf[DIRSIZ] = '\0';
  2018. >         fname = fnambuf;
  2019. >         if (!strcmp(fname, ".") || !strcmp(fname, ".."))
  2020. >             continue;
  2021. > #endif rewinddir
  2022. diff -r source/support/restore.c ../ingres.ptf/source/support/restore.c
  2023. 15d14
  2024. < # include       <ctlmod.h>
  2025. 26,39d24
  2026. < struct _cm_t    Cm;        /* the system topography map */
  2027. < struct _ctx_t    Ctx;        /* the current context */
  2028. < int        Syncs[CM_MAXPROC];/* expected SYNC's from each proc */
  2029. < /* General System Information */
  2030. < jmp_buf        CmReset;    /* restart addr on interrupt */
  2031. < # ifdef xMONITOR
  2032. < struct monitor    CmMonBuf;    /* monitor buffer for CM overhead */
  2033. < # endif xMONITOR
  2034. 69a55,58
  2035. > #ifndef rewinddir
  2036. > typedef    DIR    FILE;
  2037. > #endif
  2038. 82,83c71,72
  2039. <     extern    void    (*ExitFn)();
  2040. <     extern  void    rubproc(), exit();
  2041. ---
  2042. >     extern        (*ExitFn)();
  2043. >     extern          rubproc(), exit();
  2044. 223,224c212,213
  2045. <     extern     void        uperr(), (*ExitFn)();
  2046. <     void            (*tmpfn)();
  2047. ---
  2048. >     extern             uperr(), (*ExitFn)();
  2049. >     int            (*tmpfn)();
  2050. 226a216,218
  2051. > # ifndef rewinddir
  2052. >     char            fnambuf[DIRSIZ+1];
  2053. > # endif
  2054. 238a231
  2055. > # ifdef rewinddir
  2056. 239a233,237
  2057. > # else
  2058. >         strncpy(fnambuf, dp->d_name, DIRSIZ);
  2059. >         fnamebuf[DIRSIZ] = '\0';
  2060. >         fname = fnamebuf;
  2061. > # endif
  2062. 280d277
  2063. < void
  2064. 295d291
  2065. < void
  2066. diff -r source/support/subs.c ../ingres.ptf/source/support/subs.c
  2067. 15a16,48
  2068. > #ifndef rewinddir
  2069. > typedef    DIR    FILE;
  2070. > DIR *
  2071. > opendir(d)
  2072. > char *d;
  2073. > {
  2074. >     return(fopen(d, "r"));
  2075. > }
  2076. > closedir(d);
  2077. > DIR *d;
  2078. > {
  2079. >     return(fclose(d));
  2080. > }
  2081. > struct direct *
  2082. > readdir(dirp)
  2083. > DIR *dirp;
  2084. > {
  2085. >     static struct direct direc;
  2086. >     struct direct *d = &direc;
  2087. >     int n;
  2088. >     n = fread(&direc, sizeof(struct direct), 1, dirp);
  2089. >     if (n <= 0)
  2090. >         d = NULL;
  2091. >     return(d);
  2092. > }
  2093. > #endif rewinddir
  2094. 162a196,198
  2095. > #ifndef rewinddir
  2096. >     static char        dbname[DIRSIZ+1];
  2097. > #endif
  2098. 185a222
  2099. > #ifdef rewinddir
  2100. 186a224,228
  2101. > #else
  2102. >                 strncpy(dbname, dp->d_name, DIRSIZ);
  2103. >                 dbname[DIRSIZ] = '\0';
  2104. >                 db = dbname;
  2105. > #endif
  2106. diff -r source/support/usersetup.c ../ingres.ptf/source/support/usersetup.c
  2107. 35c35
  2108. <         char            code[2];
  2109. ---
  2110. >     register char    *code;
  2111. 37c37
  2112. <     FILE    *iop;
  2113. ---
  2114. >     register int    iop;
  2115. 40,41c40,41
  2116. <     extern    void    (*ExitFn)();
  2117. <     void    sysexit();
  2118. ---
  2119. >     extern    int    (*ExitFn)();
  2120. >     extern    int    sysexit();
  2121. 52,54c52,53
  2122. <         code[0] = 'a';
  2123. <         code[1] = 'a';
  2124. <     if ((iop = fopen("/etc/passwd", "r")) == NULL)
  2125. ---
  2126. >     code = "aa";
  2127. >     if ((iop = (int) fopen("/etc/passwd", "r")) == NULL)
  2128. 79c78
  2129. <     if ((iop = fopen("/etc/passwd", "r")) == NULL)
  2130. ---
  2131. >     if ((iop = (int) fopen("/etc/passwd", "r")) == NULL)
  2132. 93d91
  2133. 142,143c140,141
  2134. <     char    *c;
  2135. <     char    a, b;
  2136. ---
  2137. >     register char    *c;
  2138. >     register char    a, b;
  2139. 176,177d173
  2140. < void
  2141. Only in source/support: y.tab.h
  2142.