| 1 | #ifdef RCSID |
| 2 | static char RCSid[] = |
| 3 | "$Header: d:/cvsroot/tads/TADS2/OSERR.C,v 1.2 1999/05/17 02:52:12 MJRoberts Exp $"; |
| 4 | #endif |
| 5 | |
| 6 | /* |
| 7 | * Copyright (c) 1992, 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 | oserr.c - find error message file |
| 15 | Function |
| 16 | Looks in executable's directory for TADSERR.MSG, and opens it |
| 17 | Notes |
| 18 | None |
| 19 | Modified |
| 20 | 04/04/99 CNebel - Improve const-ness. |
| 21 | 04/24/93 JEras - use new os_locate() to find tadserr.msg |
| 22 | 04/27/92 MJRoberts - creation |
| 23 | */ |
| 24 | |
| 25 | #include <string.h> |
| 26 | #include "os.h" |
| 27 | |
| 28 | osfildef *oserrop(const char *arg0) |
| 29 | { |
| 30 | char buf[128]; |
| 31 | |
| 32 | if ( !os_locate("tadserr.msg", 11, arg0, buf, sizeof(buf)) ) |
| 33 | return((osfildef *)0); |
| 34 | return(osfoprb(buf, OSFTERRS)); |
| 35 | } |