+++ /dev/null
-/* write.c -- write bytes to an output device.\r
- *\r
- * Copyright (c) 1995 Cygnus Support\r
- *\r
- * The authors hereby grant permission to use, copy, modify, distribute,\r
- * and license this software and its documentation for any purpose, provided\r
- * that existing copyright notices are retained in all copies and that this\r
- * notice is included verbatim in any distributions. No written agreement,\r
- * license, or royalty fee is required for any of the authorized uses.\r
- * Modifications to this software may be copyrighted by their authors\r
- * and need not follow the licensing terms described here, provided that\r
- * the new terms are clearly indicated on the first page of each file where\r
- * they apply.\r
- */\r
-#include "glue.h"\r
-\r
-extern int _EXFUN (outbyte, (char x));\r
-\r
-/*\r
- * write -- write bytes to the serial port. Ignore fd, since\r
- * stdout and stderr are the same. Since we have no filesystem,\r
- * open will only return an error.\r
- */\r
-int\r
-_DEFUN (write, (fd, buf, nbytes),\r
- int fd _AND\r
- char *buf _AND\r
- int nbytes)\r
-{\r
- int i;\r
-\r
- #ifdef debuglg\r
- prs("[write]\n");\r
- #endif\r
- for (i = 0; i < nbytes; i++) {\r
- if (*(buf + i) == '\n') {\r
- outbyte ('\r');\r
- }\r
- outbyte (*(buf + i));\r
- }\r
- return (nbytes);\r
-}\r