tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / workbench / network / stacks / AROSTCP / netlib / iomode.c
blob9fda00091707a2fda45335a296b32e678d36f5df
1 /* $Id$
3 * iomode.c - set file io mode (normal or translated) (SAS/C)
5 * Copyright © 1994 AmiTCP/IP Group,
6 * Network Solutions Development Inc.
7 * All rights reserved.
8 */
10 #include <ios1.h>
11 #include <stdlib.h>
13 int
14 iomode(int fd, int mode)
16 struct UFB *ufb;
19 * find the ufb *
21 if ((ufb = __chkufb(fd)) == NULL) {
22 return -1;
25 * Set the translation mode
27 * mode == 0 - translate mode on
28 * mode == 1 - translate mode off
30 if (mode)
31 ufb->ufbflg &= ~UFB_XLAT;
32 else
33 ufb->ufbflg |= UFB_XLAT;
35 return 0;