strio.c (98121) | strio.c (141858) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers. | 2 * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers. |
3 * All rights reserved. 4 * Copyright (c) 1990, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Chris Torek. 9 * 10 * By using this file, you agree to the terms and conditions set 11 * forth in the LICENSE file which can be found at the top level of 12 * the sendmail distribution. 13 */ 14 15#include <sm/gen.h> | 3 * All rights reserved. 4 * Copyright (c) 1990, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Chris Torek. 9 * 10 * By using this file, you agree to the terms and conditions set 11 * forth in the LICENSE file which can be found at the top level of 12 * the sendmail distribution. 13 */ 14 15#include <sm/gen.h> |
16SM_IDSTR(id, "@(#)$Id: strio.c,v 1.42 2002/02/11 23:05:50 gshapiro Exp $") | 16SM_IDSTR(id, "@(#)$Id: strio.c,v 1.43 2004/08/03 20:48:30 ca Exp $") |
17#include <stdlib.h> 18#include <unistd.h> 19#include <fcntl.h> 20#include <string.h> 21#include <errno.h> 22#include <sm/rpool.h> 23#include <sm/io.h> 24#include <sm/heap.h> 25#include <sm/conf.h> 26#include "local.h" 27 | 17#include <stdlib.h> 18#include <unistd.h> 19#include <fcntl.h> 20#include <string.h> 21#include <errno.h> 22#include <sm/rpool.h> 23#include <sm/io.h> 24#include <sm/heap.h> 25#include <sm/conf.h> 26#include "local.h" 27 |
28static int sm_strsetmode __P((SM_FILE_T*, const int *)); 29static int sm_strgetmode __P((SM_FILE_T*, int *)); 30 |
|
28/* 29** Cookie structure for the "strio" file type 30*/ 31 32struct sm_str_obj 33{ 34 char *strio_base; 35 char *strio_end; --- 272 unchanged lines hidden (view full) --- 308** fp -- the file pointer 309** mode -- location of new mode to set 310** 311** Results: 312** Success: 0 (zero) 313** Failure: -1 and sets errno 314*/ 315 | 31/* 32** Cookie structure for the "strio" file type 33*/ 34 35struct sm_str_obj 36{ 37 char *strio_base; 38 char *strio_end; --- 272 unchanged lines hidden (view full) --- 311** fp -- the file pointer 312** mode -- location of new mode to set 313** 314** Results: 315** Success: 0 (zero) 316** Failure: -1 and sets errno 317*/ 318 |
316int | 319static int |
317sm_strsetmode(fp, mode) 318 SM_FILE_T *fp; 319 const int *mode; 320{ 321 register SM_STR_OBJ_T *s = fp->f_cookie; 322 int flags; 323 324 switch (*mode) --- 163 unchanged lines hidden --- | 320sm_strsetmode(fp, mode) 321 SM_FILE_T *fp; 322 const int *mode; 323{ 324 register SM_STR_OBJ_T *s = fp->f_cookie; 325 int flags; 326 327 switch (*mode) --- 163 unchanged lines hidden --- |