xref: /onnv-gate/usr/src/lib/libast/common/string/modedata.c (revision 12068:08a39a083754)
14887Schin /***********************************************************************
24887Schin *                                                                      *
34887Schin *               This software is part of the ast package               *
4*12068SRoger.Faulkner@Oracle.COM *          Copyright (c) 1985-2010 AT&T Intellectual Property          *
54887Schin *                      and is licensed under the                       *
64887Schin *                  Common Public License, Version 1.0                  *
78462SApril.Chin@Sun.COM *                    by AT&T Intellectual Property                     *
84887Schin *                                                                      *
94887Schin *                A copy of the License is available at                 *
104887Schin *            http://www.opensource.org/licenses/cpl1.0.txt             *
114887Schin *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
124887Schin *                                                                      *
134887Schin *              Information and Software Systems Research               *
144887Schin *                            AT&T Research                             *
154887Schin *                           Florham Park NJ                            *
164887Schin *                                                                      *
174887Schin *                 Glenn Fowler <gsf@research.att.com>                  *
184887Schin *                  David Korn <dgk@research.att.com>                   *
194887Schin *                   Phong Vo <kpv@research.att.com>                    *
204887Schin *                                                                      *
214887Schin ***********************************************************************/
224887Schin #pragma prototyped
234887Schin /*
244887Schin  * Glenn Fowler
254887Schin  * AT&T Bell Laboratories
264887Schin  *
274887Schin  * fmtmode() and strperm() readonly data
284887Schin  * for external format modes
294887Schin  */
304887Schin 
314887Schin #include "modelib.h"
324887Schin 
334887Schin struct modeop	modetab[MODELEN] =
344887Schin {
354887Schin 	0170000, 12, 0000000, 0, "-pc?d?b?-Cl?sDw?",
364887Schin 	0000400,  8, 0000000, 0, "-r",
374887Schin 	0000200,  7, 0000000, 0, "-w",
384887Schin 	0004000, 10, 0000100, 6, "-xSs",
394887Schin 	0000040,  5, 0000000, 0, "-r",
404887Schin 	0000020,  4, 0000000, 0, "-w",
414887Schin #ifdef S_ICCTYP
424887Schin 	0003000,  8, 0000010, 3, "-x-xSs-x",
434887Schin #else
444887Schin 	0002000,  9, 0000010, 3, "-xls",
454887Schin #endif
464887Schin 	0000004,  2, 0000000, 0, "-r",
474887Schin 	0000002,  1, 0000000, 0, "-w",
484887Schin #ifdef S_ICCTYP
494887Schin 	0003000,  8, 0000001, 0, "-xyY-xeE",
504887Schin #else
514887Schin 	0001000,  8, 0000001, 0, "-xTt",
524887Schin #endif
534887Schin };
544887Schin 
554887Schin int	permmap[PERMLEN] =
564887Schin {
574887Schin 	S_ISUID, X_ISUID,
584887Schin 	S_ISGID, X_ISGID,
594887Schin 	S_ISVTX, X_ISVTX,
604887Schin 	S_IRUSR, X_IRUSR,
614887Schin 	S_IWUSR, X_IWUSR,
624887Schin 	S_IXUSR, X_IXUSR,
634887Schin 	S_IRGRP, X_IRGRP,
644887Schin 	S_IWGRP, X_IWGRP,
654887Schin 	S_IXGRP, X_IXGRP,
664887Schin 	S_IROTH, X_IROTH,
674887Schin 	S_IWOTH, X_IWOTH,
684887Schin 	S_IXOTH, X_IXOTH
694887Schin };
70