2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * "user" backend for nsswitch "printers" database. This module implements 2N/A * the ${HOME}/.printers naming support. This file provides users with a 2N/A * convenient method of aliasing and specifying an interest list. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A /* append the value ':' must be escaped for posix style names */ 2N/A * printers has the hostname as part of the data in the file, but the other 2N/A * backends don't include it in the data passed to the backend. For this 2N/A * reason, we process everything here and don't bother calling the backend. 2N/A * filter not useful here since the key 2N/A * we are looking for is the first "word" 2N/A * on the line and we can be fast enough. 2N/A * _nss_user_read_line does process the '\' that are used 2N/A * linelen counts the characters up to but excluding the '\n' 2N/A if (*p ==
'#')
/* comment */ 2N/A * find the name in the namelist a|b|c...: 2N/A else /* skip the '|' */ 2N/A /* printers_getbyname() has not set/endent; rewind on each call */