home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pine / imap-3.0 / ANSI / c-client / os_mac.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-07  |  3.0 KB  |  90 lines

  1. /*
  2.  * Program:    Operating-system dependent routines -- Macintosh version
  3.  *
  4.  * Author:    Mark Crispin
  5.  *        6158 Lariat Loop NE
  6.  *        Bainbridge Island, WA  98110-2098
  7.  *        Internet: MRC@Panda.COM
  8.  *
  9.  * Date:    26 January 1992
  10.  * Last Edited:    7 June 1993
  11.  *
  12.  * Copyright 1993 by Mark Crispin
  13.  *
  14.  *  Permission to use, copy, modify, and distribute this software and its
  15.  * documentation for any purpose and without fee is hereby granted, provided
  16.  * that the above copyright notice appears in all copies and that both the
  17.  * above copyright notices and this permission notice appear in supporting
  18.  * documentation, and that the name of Mark Crispin not be used in advertising
  19.  * or publicity pertaining to distribution of the software without specific,
  20.  * written prior permission.  This software is made available "as is", and
  21.  * MARK CRISPIN DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO
  22.  * THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF
  23.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN NO EVENT SHALL
  24.  * MARK CRISPIN BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
  25.  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  26.  * WHETHER IN AN ACTION OF CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT
  27.  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
  28.  * THIS SOFTWARE.
  29.  *
  30.  */
  31.  
  32.  
  33. /*  This is a totally new operating-system dependent module for the Macintosh,
  34.  * written using THINK C on my Mac PowerBook-100 in my free time.
  35.  * Unlike earlier efforts, this version requires no external TCP library.  It
  36.  * also takes advantage of the Map panel in System 7 for the timezone.
  37.  */
  38.  
  39. #include <stdlib.h>
  40. #include <string.h>
  41. #include <types.h>
  42. #ifndef noErr
  43. #include <Desk.h>
  44. #include <Devices.h>
  45. #include <Errors.h>
  46. #include <Events.h>
  47. #include <Fonts.h>
  48. #include <Memory.h>
  49. #include <Menus.h>
  50. #include <ToolUtils.h>
  51. #include <Windows.h>
  52. #endif
  53.  
  54.  
  55. /* Dummy definition overridden by TCP routines */
  56.  
  57. #ifndef TCPSTREAM
  58. #define TCPSTREAM void
  59. #endif
  60.  
  61. /* Make this global so caller can sniff */
  62.  
  63. extern short resolveropen;
  64.  
  65.  
  66. /* Function prototypes */
  67.  
  68. void rfc822_date (char *date);
  69. void *fs_get (size_t size);
  70. void fs_resize (void **block,size_t size);
  71. void fs_give (void **block);
  72. void fatal (char *string);
  73. char *strcrlfcpy (char **dst,unsigned long *dstl,char *src,unsigned long srcl);
  74. unsigned long strcrlflen (STRING *s);
  75. TCPSTREAM *tcp_open (char *host,long port);
  76. pascal void tcp_dns_result (struct hostInfo *hostInfoPtr,char *userDataPtr);
  77. TCPSTREAM *tcp_aopen (char *host,char *service);
  78. char *tcp_getline (TCPSTREAM *stream);
  79. long tcp_getbuffer (TCPSTREAM *stream,unsigned long size,char *buffer);
  80. long tcp_getdata (TCPSTREAM *stream);
  81. long tcp_soutr (TCPSTREAM *stream,char *string);
  82. long tcp_sout (TCPSTREAM *stream,char *string,unsigned long size);
  83. void tcp_close (TCPSTREAM *stream);
  84. char *tcp_host (TCPSTREAM *stream);
  85. char *tcp_localhost (TCPSTREAM *stream);
  86. unsigned long gethostid (void);
  87. long random (void);
  88. long getpid (void);
  89. long wait (void);
  90.