imapext-2007

view src/osdep/amiga/ssl_none.c @ 0:ada5e610ab86

imap-2007e
author yuuji@gentei.org
date Mon, 14 Sep 2009 15:17:45 +0900
parents
children
line source
1 /* ========================================================================
2 * Copyright 1988-2006 University of Washington
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 *
11 * ========================================================================
12 */
14 /*
15 * Program: Dummy (no SSL) authentication/encryption module
16 *
17 * Author: Mark Crispin
18 * Networks and Distributed Computing
19 * Computing & Communications
20 * University of Washington
21 * Administration Building, AG-44
22 * Seattle, WA 98195
23 * Internet: MRC@CAC.Washington.EDU
24 *
25 * Date: 7 February 2001
26 * Last Edited: 30 August 2006
27 */
29 /* Init server for SSL
30 * Accepts: server name
31 */
33 void ssl_server_init (char *server)
34 {
35 syslog (LOG_ERR,"This server does not support SSL");
36 exit (1); /* punt this program too */
37 }
40 /* Start TLS
41 * Accepts: /etc/services service name
42 * Returns: cpystr'd error string if TLS failed, else NIL for success
43 */
45 char *ssl_start_tls (char *server)
46 {
47 return cpystr ("This server does not support TLS");
48 }
50 /* Get character
51 * Returns: character or EOF
52 */
54 int PBIN (void)
55 {
56 return getchar ();
57 }
60 /* Get string
61 * Accepts: destination string pointer
62 * number of bytes available
63 * Returns: destination string pointer or NIL if EOF
64 */
66 char *PSIN (char *s,int n)
67 {
68 return fgets (s,n,stdin);
69 }
72 /* Get record
73 * Accepts: destination string pointer
74 * number of bytes to read
75 * Returns: T if success, NIL otherwise
76 */
78 long PSINR (char *s,unsigned long n)
79 {
80 unsigned long i;
81 while (n && ((i = fread (s,1,n,stdin)) || (errno == EINTR))) s += i,n -= i;
82 return n ? NIL : LONGT;
83 }
86 /* Wait for input
87 * Accepts: timeout in seconds
88 * Returns: T if have input on stdin, else NIL
89 */
91 long INWAIT (long seconds)
92 {
93 return server_input_wait (seconds);
94 }
96 /* Put character
97 * Accepts: character
98 * Returns: character written or EOF
99 */
101 int PBOUT (int c)
102 {
103 return putchar (c);
104 }
107 /* Put string
108 * Accepts: source string pointer
109 * Returns: 0 or EOF if error
110 */
112 int PSOUT (char *s)
113 {
114 return fputs (s,stdout);
115 }
118 /* Put record
119 * Accepts: source sized text
120 * Returns: 0 or EOF if error
121 */
123 int PSOUTR (SIZEDTEXT *s)
124 {
125 unsigned char *t;
126 unsigned long i,j;
127 for (t = s->data,i = s->size;
128 (i && ((j = fwrite (t,1,i,stdout)) || (errno == EINTR)));
129 t += j,i -= j);
130 return i ? EOF : NIL;
131 }
134 /* Flush output
135 * Returns: 0 or EOF if error
136 */
138 int PFLUSH (void)
139 {
140 return fflush (stdout);
141 }

UW-IMAP'd extensions by yuuji