1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

Makefile: Added new codepage - 866.

charset.c: Supporting code for codepage 866.
clientutil.c: Fix compile bug in little-used #define.
includes.h: Supporting code for codepage 866.
make_smbcodepage.c: Supporting code for codepage 866.
pcap.c: Fix bug for lpstat.
Jeremy.
(This used to be commit 6040d7a39e5d5ab426905aa79b871df815fb9b62)
This commit is contained in:
Jeremy Allison 1998-01-16 06:29:38 +00:00
parent 7ab9d270fe
commit fec28f2def
5 changed files with 16 additions and 15 deletions

View File

@ -908,7 +908,7 @@ BOOL cli_open_sockets(int port )
interpret_addr(lp_socket_address()))) != -1) {
set_socket_options(bcast, "SO_BROADCAST");
if ((ip_list = name_query(bcast, host, name_type, True, True, *iface_bcast(dest_ip),
if (ip_list = name_query(bcast, host, name_type, True, True, *iface_bcast(dest_ip),
&count,0)) {
dest_ip = ip_list[0];
free(ip_list);

View File

@ -1168,6 +1168,10 @@ extern char *sys_errlist[];
#include "kanji.h"
#include "charset.h"
#ifndef MAXCODEPAGELINES
#define MAXCODEPAGELINES 256
#endif
/***** automatically generated prototypes *****/
#include "proto.h"

View File

@ -216,11 +216,11 @@ static codepage_p load_client_codepage( int client_codepage )
/* Check if it is at least big enough to hold the required
data. Should be 2 byte version, 2 byte codepage, 4 byte length,
plus zero or more bytes of data. Note that the data cannot be more
than 512 bytes - giving a max size of 520.
than 4 * MAXCODEPAGELINES bytes.
*/
size = (unsigned int)st.st_size;
if( size < CODEPAGE_HEADER_SIZE || size > (CODEPAGE_HEADER_SIZE + 256))
if( size < CODEPAGE_HEADER_SIZE || size > (CODEPAGE_HEADER_SIZE + 4 * MAXCODEPAGELINES))
{
DEBUG(0,("load_client_codepage: file %s is an incorrect size for a \
code page file.\n", codepage_file_name));
@ -323,10 +323,9 @@ initialise the client codepage.
void codepage_initialise(int client_codepage)
{
int i;
codepage_p cp = NULL;
static BOOL done = False;
static codepage_p cp = NULL;
if(done == True)
if(cp != NULL)
{
DEBUG(6,
("codepage_initialise: called twice - ignoring second client code page = %d\n",
@ -361,8 +360,6 @@ for code page %d failed. Using default client codepage 850\n",
for(i = 0; !((cp[i][0] == '\0') && (cp[i][1] == '\0')); i++)
add_dos_char(cp[i][0], (BOOL)cp[i][2], cp[i][1], (BOOL)cp[i][3]);
}
done = True;
}
/*******************************************************************

View File

@ -267,7 +267,7 @@ BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname)
#endif
#ifdef AIX
if (strlocate(psz,"/qconfig") != NULL)
if (strlocate(psz,"/qconfig"))
return(ScanQconfig(psz,pszPrintername));
#endif
@ -336,7 +336,7 @@ void pcap_printer_fn(void (*fn)())
#endif
#ifdef AIX
if (strlocate(psz,"/qconfig") != NULL)
if (strlocate(psz,"/qconfig"))
{
ScanQconfig_fn(psz,fn);
return;

View File

@ -167,7 +167,7 @@ int do_compile(int codepage, char *input_file, char *output_file)
FILE *fp = NULL;
uint32 size = 0;
char *buf = NULL;
char output_buf[CODEPAGE_HEADER_SIZE + 512];
char output_buf[CODEPAGE_HEADER_SIZE + 4 * MAXCODEPAGELINES];
int num_lines = 0;
int i = 0;
struct stat st;
@ -223,11 +223,11 @@ The maximum size I will believe is 100k.\n", prog_name, size);
num_lines = clean_data( &buf, &size);
/* There can be a maximum of 128 lines. */
if(num_lines > 128)
/* There can be a maximum of MAXCODEPAGELINES lines. */
if(num_lines > MAXCODEPAGELINES)
{
fprintf(stderr, "%s: There can be a maximum 128 lines of data in a codepage \
definition file. File %s has %d.\n", prog_name, input_file, num_lines);
fprintf(stderr, "%s: There can be a maximum %d lines of data in a codepage \
definition file. File %s has %d.\n", prog_name, MAXCODEPAGELINES, input_file, num_lines);
exit(1);
}