Changeset 454 for trunk/server/source3/param/loadparm.c
- Timestamp:
- Jun 4, 2010, 3:11:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/source3/param/loadparm.c
r414 r454 4665 4665 case PRINT_AIX: 4666 4666 case PRINT_LPRNT: 4667 #ifndef __OS2__ 4667 4668 case PRINT_LPROS2: 4669 #endif 4668 4670 string_set(&pService->szLpqcommand, "lpq -P'%p'"); 4669 4671 string_set(&pService->szLprmcommand, "lprm -P'%p' %j"); 4670 4672 string_set(&pService->szPrintcommand, "lpr -r -P'%p' %s"); 4671 4673 break; 4674 #ifdef __OS2__ 4675 case PRINT_LPROS2: 4676 string_set(&pService->szLpqcommand, "lpq.exe -s %i -p %p"); 4677 string_set(&pService->szLprmcommand, "lprm.exe -s %i -p %p %j"); 4678 string_set(&pService->szPrintcommand, "lpr.exe -b -s %i -p %p %s & cmd.exe /c del %s"); 4679 break; 4680 #endif 4672 4681 4673 4682 case PRINT_LPRNG: … … 4938 4947 string_set(&Globals.szGuestaccount, GUEST_ACCOUNT); 4939 4948 4949 #ifdef __OS2__ 4950 /* search the system codepage and set OS2CodePageStr */ 4951 unsigned long _System DosQueryCp (unsigned long ulLength, unsigned long *pCodePageList, unsigned long *pDataLength); 4952 char *OS2CodePageStr=NULL; 4953 unsigned long OS2CodePage[3]; 4954 unsigned long OS2CodePageLen; 4955 if ( DosQueryCp( sizeof(OS2CodePage), OS2CodePage, &OS2CodePageLen ) ) 4956 asprintf(&OS2CodePageStr, "SYSTEM"); 4957 else 4958 asprintf(&OS2CodePageStr, "IBM-%u", OS2CodePage[0]); 4959 #endif 4960 #ifndef __OS2__ 4940 4961 /* using UTF8 by default allows us to support all chars */ 4941 4962 string_set(&Globals.unix_charset, DEFAULT_UNIX_CHARSET); 4963 #else 4964 /* On OS/2, using UTF8 causes problems with display of foreign 4965 characters - default to system codepage */ 4966 string_set(&Globals.unix_charset, OS2CodePageStr); 4967 #endif 4942 4968 4943 4969 #if defined(HAVE_NL_LANGINFO) && defined(CODESET) 4944 4970 /* If the system supports nl_langinfo(), try to grab the value 4945 4971 from the user's locale */ 4972 #ifndef __OS2__ 4946 4973 string_set(&Globals.display_charset, "LOCALE"); 4974 #else 4975 /* On OS/2, using UTF8 causes problems with display of foreign 4976 characters - default to system codepage */ 4977 string_set(&Globals.display_charset, OS2CodePageStr); 4978 #endif 4979 4947 4980 #else 4948 4981 string_set(&Globals.display_charset, DEFAULT_DISPLAY_CHARSET); 4949 4982 #endif 4950 4983 4984 #ifndef __OS2__ 4951 4985 /* Use codepage 850 as a default for the dos character set */ 4952 4986 string_set(&Globals.dos_charset, DEFAULT_DOS_CHARSET); 4987 #else 4988 /* On OS/2, using UTF8 causes problems with display of foreign 4989 characters - default to system codepage */ 4990 string_set(&Globals.dos_charset, OS2CodePageStr); 4991 #endif 4953 4992 4954 4993 /*
Note:
See TracChangeset
for help on using the changeset viewer.