1 2/* 3 * Copyright 1990 Network Computing Devices; 4 * Portions Copyright 1987 by Digital Equipment Corporation 5 * 6 * Permission to use, copy, modify, distribute, and sell this software 7 * and its documentation for any purpose is hereby granted without fee, 8 * provided that the above copyright notice appear in all copies and 9 * that both that copyright notice and this permission notice appear 10 * in supporting documentation, and that the names of Network Computing 11 * Devices or Digital not be used in advertising or publicity pertaining 12 * to distribution of the software without specific, written prior 13 * permission. Network Computing Devices or Digital make no representations 14 * about the suitability of this software for any purpose. It is provided 15 * "as is" without express or implied warranty. 16 * 17 * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH 18 * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES 20 * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES 21 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 22 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 23 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 24 * SOFTWARE. 25 */ 26 27/* 28 29Copyright 1987, 1994, 1998 The Open Group 30 31Permission to use, copy, modify, distribute, and sell this software and its 32documentation for any purpose is hereby granted without fee, provided that 33the above copyright notice appear in all copies and that both that 34copyright notice and this permission notice appear in supporting 35documentation. 36 37The above copyright notice and this permission notice shall be included in 38all copies or substantial portions of the Software. 39 40THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 41IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 42FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 43OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 44AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 45CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 46 47Except as contained in this notice, the name of The Open Group shall not be 48used in advertising or otherwise to promote the sale, use or other dealings 49in this Software without prior written authorization from The Open Group. 50 51*/ 52 53#ifdef HAVE_CONFIG_H 54#include <config.h> 55#endif 56#include <stdio.h> 57#include <X11/Xosdefs.h> 58#include <stdlib.h> 59#include "FSlib.h" 60 61const char * 62FSServerName(const char *server) 63{ 64 const char *s; 65 66 if (server != NULL && *server != '\0') 67 return server; 68 if ((s = getenv("FONTSERVER")) != NULL) 69 return s; 70 return NULL; 71} 72