1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 28 /* All Rights Reserved */ 29 30 31 #pragma ident "%Z%%M% %I% %E% SMI" 32 /* LINTLIBRARY */ 33 34 #include "stdlib.h" 35 36 #include "lp.h" 37 38 char Lp_Spooldir[] = SPOOLDIR; 39 char Lp_Admins[] = SPOOLDIR "/admins"; 40 char Lp_FIFO[] = SPOOLDIR "/fifos/FIFO"; 41 char Lp_Private_FIFOs[] = SPOOLDIR "/fifos/private"; 42 char Lp_Public_FIFOs[] = SPOOLDIR "/fifos/public"; 43 char Lp_Requests[] = SPOOLDIR "/requests"; 44 char Lp_Schedlock[] = SPOOLDIR "/SCHEDLOCK"; 45 char Lp_System[] = SPOOLDIR "/system"; 46 char Lp_Temp[] = SPOOLDIR "/temp"; 47 char Lp_Tmp[] = SPOOLDIR "/tmp"; 48 49 char Lp_Bin[] = LPDIR "/bin"; 50 char Lp_Model[] = LPDIR "/model"; 51 char Lp_Slow_Filter[] = LPDIR "/bin/slow.filter"; 52 53 char Lp_A_Logs[] = LOGDIR; 54 char Lp_Logs[] = LOGDIR; 55 char Lp_ReqLog[] = LOGDIR "/requests"; 56 57 char Lp_A[] = ETCDIR; 58 char Lp_Users[] = ETCDIR "/users"; 59 char Lp_A_Classes[] = ETCDIR "/classes"; 60 char Lp_A_Forms[] = ETCDIR "/forms"; 61 char Lp_A_Interfaces[] = ETCDIR "/interfaces"; 62 char Lp_A_Printers[] = ETCDIR "/printers"; 63 char Lp_A_PrintWheels[] = ETCDIR "/pwheels"; 64 char Lp_A_Systems[] = ETCDIR "/systems"; 65 char Lp_A_Filters[] = ETCDIR "/filter.table"; 66 char Lp_Default[] = ETCDIR "/default"; 67 char Lp_A_Faults[] = ETCDIR "/alerts"; 68 69 /* 70 ** Sorry about these nonfunctional functions. The data is 71 ** static now. These exist for historical reasons. 72 */ 73 74 #undef getpaths 75 #undef getadminpaths 76 77 void getpaths ( void ) { return; } 78 void getadminpaths ( char * admin) { return; } 79 80 /** 81 ** getprinterfile() - BUILD NAME OF PRINTER FILE 82 **/ 83 84 char * 85 getprinterfile(char *name, char *component) 86 { 87 char *path; 88 89 if (!name) 90 return (0); 91 92 path = makepath(Lp_A_Printers, name, component, NULL); 93 94 return (path); 95 } 96 97 /** 98 ** getsystemfile() - BUILD NAME OF SYSTEM FILE 99 **/ 100 101 char * 102 getsystemfile(char *name, char *component) 103 { 104 char *path; 105 106 if (!name) 107 return (0); 108 109 path = makepath(Lp_A_Systems, name, component, NULL); 110 111 return (path); 112 } 113 114 /** 115 ** getclassfile() - BUILD NAME OF CLASS FILE 116 **/ 117 118 char * 119 getclassfile(char *name) 120 { 121 char *path; 122 123 if (!name) 124 return (0); 125 126 path = makepath(Lp_A_Classes, name, NULL); 127 128 return (path); 129 } 130 131 /** 132 ** getfilterfile() - BUILD NAME OF FILTER TABLE FILE 133 **/ 134 135 char * 136 getfilterfile(char *table) 137 { 138 char *path; 139 140 if (!table) 141 table = FILTERTABLE; 142 143 path = makepath(ETCDIR, table, NULL); 144 145 return (path); 146 } 147 148 /** 149 ** getformfile() - BUILD NAME OF PRINTER FILE 150 **/ 151 152 char * 153 getformfile(char *name, char *component) 154 { 155 char *path; 156 157 if (!name) 158 return (0); 159 160 path = makepath(Lp_A_Forms, name, component, NULL); 161 162 return (path); 163 } 164