home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / pine / c-client / os_ptx.h < prev    next >
C/C++ Source or Header  |  1994-01-09  |  3KB  |  115 lines

  1. /*
  2.  * Program:    Operating-system dependent routines -- PTX version
  3.  *
  4.  * Author:    Donn Cave
  5.  *        University Computing Services, JE-30
  6.  *        University of Washington
  7.  *        Seattle, WA 98195
  8.  *        Internet: donn@cac.washington.edu
  9.  *
  10.  * Date:    11 May 1989
  11.  * Last Edited:    16 August 1993
  12.  *
  13.  * Copyright 1993 by the University of Washington
  14.  *
  15.  *  Permission to use, copy, modify, and distribute this software and its
  16.  * documentation for any purpose and without fee is hereby granted, provided
  17.  * that the above copyright notice appears in all copies and that both the
  18.  * above copyright notice and this permission notice appear in supporting
  19.  * documentation, and that the name of the University of Washington not be
  20.  * used in advertising or publicity pertaining to distribution of the software
  21.  * without specific, written prior permission.  This software is made
  22.  * available "as is", and
  23.  * THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  24.  * WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  25.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  26.  * NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  27.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  28.  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  29.  * (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  30.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  31.  *
  32.  */
  33.  
  34. #define MAILFILE "/usr/mail/%s"
  35. #define ACTIVEFILE "/usr/lib/news/active"
  36. #define NEWSSPOOL "/usr/spool/news"
  37. #define NEWSRC strcat (strcpy (tmp,myhomedir ()),"/.newsrc")
  38. #define NFSKLUDGE
  39.  
  40. #include <string.h>
  41.  
  42. #include <sys/types.h>
  43. #include <sys/dir.h>
  44. #include <stdlib.h>
  45. #include <sys/fcntl.h>
  46. #include <unistd.h>
  47. #include <time.h>
  48. #include <sys/utime.h>
  49. #include <dirent.h>
  50. #include <sys/uio.h>        /* needed for writev() prototypes */
  51. #include <stropts.h>        /* needed in daemons */
  52.  
  53.  
  54. /* Different names, equivalent things in BSD and SysV */
  55.  
  56. #define L_SET SEEK_SET
  57. #define L_INCR SEEK_CUR
  58. #define L_XTND SEEK_END
  59.  
  60. #define direct dirent
  61.  
  62. /* For flock() emulation */
  63.  
  64. #define LOCK_SH 1
  65. #define LOCK_EX 2
  66. #define LOCK_NB 4
  67. #define LOCK_UN 8
  68.  
  69.  
  70. /* For gettimeofday() emulation */
  71.  
  72. struct timezone {
  73.   int tz_minuteswest;        /* of Greenwich */
  74.   int tz_dsttime;        /* type of dst correction to apply */
  75. };
  76.  
  77.  
  78. /* Dummy definition overridden by TCP routines */
  79.  
  80. #ifndef TCPSTREAM
  81. #define TCPSTREAM void
  82. #endif
  83.  
  84. /* Function prototypes */
  85.  
  86. void rfc822_date  ();
  87. void *fs_get  ();
  88. void fs_resize  ();
  89. void fs_give  ();
  90. void fatal  ();
  91. unsigned long strcrlfcpy  ();
  92. unsigned long strcrlflen  ();
  93. long server_login  ();
  94. char *myusername ();
  95. char *myhomedir ();
  96. char *lockname  ();
  97. TCPSTREAM *tcp_open  ();
  98. TCPSTREAM *tcp_aopen  ();
  99. char *tcp_getline  ();
  100. long tcp_getbuffer  ();
  101. long tcp_getdata  ();
  102. long tcp_soutr  ();
  103. long tcp_sout  ();
  104. void tcp_close  ();
  105. char *tcp_host  ();
  106. char *tcp_localhost  ();
  107.  
  108. long gethostid ();
  109. long random ();
  110. void *memmove ();
  111. int scandir ();
  112. int flock ();
  113. int gettimeofday ();
  114. int utimes ();
  115.