| | 1 | #ifdef RCSID |
| | 2 | static char RCSid[] = |
| | 3 | "$Header: d:/cvsroot/tads/TADS2/OUT.C,v 1.2 1999/05/17 02:52:12 MJRoberts Exp $"; |
| | 4 | #endif |
| | 5 | |
| | 6 | /* |
| | 7 | * Copyright (c) 1991, 2002 Michael J. Roberts. All Rights Reserved. |
| | 8 | * |
| | 9 | * Please see the accompanying license file, LICENSE.TXT, for information |
| | 10 | * on using and copying this software. |
| | 11 | */ |
| | 12 | /* |
| | 13 | Name |
| | 14 | out.c - output formatter |
| | 15 | Function |
| | 16 | Formats output text: word wrap, etc. |
| | 17 | Notes |
| | 18 | None |
| | 19 | Modified |
| | 20 | 10/27/91 MJRoberts - creation |
| | 21 | */ |
| | 22 | |
| | 23 | #include <string.h> |
| | 24 | #include "os.h" |
| | 25 | #include "tio.h" |
| | 26 | |
| | 27 | /* |
| | 28 | * write out a runtime length-prefixed string |
| | 29 | */ |
| | 30 | void outfmt(tiocxdef *ctx, uchar *txt) |
| | 31 | { |
| | 32 | uint len; |
| | 33 | |
| | 34 | VARUSED(ctx); |
| | 35 | |
| | 36 | /* read the length prefix */ |
| | 37 | len = osrp2(txt) - 2; |
| | 38 | txt += 2; |
| | 39 | |
| | 40 | /* write out the string */ |
| | 41 | tioputslen(ctx, (char *)txt, len); |
| | 42 | } |
| | 43 | |