/******************************************************************************
* This file is Copyright 1993 by Philip G. Richards. All Rights Reserved.
* See the file README that came with this distribution for permissions on
* code usage, copying, and distribution. It comes with absolutely no warranty.
* email: <pgr@prg.ox.ac.uk>
******************************************************************************/
/* ---INFOBEGIN--- * DO NOT DELETE THIS COMMENT BLOCK!!!
COMMAND buffer none "set the size of the data packets (max 1024)"
* ---INFOEND--- */
#include "client.h"
#include "util.h"
#include "table.h"
#include <stdlib.h>
int
lbuffer_main(int argc, char * const *argv, char **envp)
{
char *newbuffer;
if (argc < 2)
{
ffprintf(STDINFO, "buffer size set to %d bytes.\n", client_buf_len);
return 0;
}
else
newbuffer = argv[1];
if (newbuffer == NULL)
return 1;
client_buf_len = atoi(newbuffer);
if (client_buf_len > UBUF_MAXSPACE)
client_buf_len = UBUF_MAXSPACE;
if (client_buf_len <= 0)
client_buf_len = UBUF_SPACE;
client_net_len = htons(client_buf_len);
return 0;
}
syntax highlighted by Code2HTML, v. 0.9.1