more bug fixes

master
Felix von Leitner 22 years ago
parent 0938bbe2aa
commit 3dc718a1a5

@ -35,13 +35,12 @@ int socket_sendfile(int out,int in,uint32 offset,uint32 bytes) {
int socket_sendfile(int out,int in,uint32 offset,uint32 bytes) {
char buf[BUFSIZE];
uint32 n,m;
int n,m;
uint32 sent=0;
if (lseek(in,offset,SEEK_SET) != offset)
return -1;
while (bytes>0) {
char* tmp=buf;
uint32 tobedone;
if ((n=read(in,tmp,(bytes<BUFSIZE)?bytes:BUFSIZE))<=0)
return (sent?sent:-1);
while (n>0) {

@ -1,6 +1,5 @@
#define NO_UINT16_MACROS
#include "uint16.h"
#include <endian.h>
void uint16_pack(char *out,uint16 in) {
out[0]=in&255;

@ -1,6 +1,5 @@
#define NO_UINT16_MACROS
#include "uint16.h"
#include <endian.h>
void uint16_pack_big(char *out,uint16 in) {
out[0]=in>>8;

@ -1,6 +1,5 @@
#define NO_UINT32_MACROS
#include "uint32.h"
#include <endian.h>
void uint32_pack(char *out,uint32 in) {
*out=in&0xff; in>>=8;

@ -1,6 +1,5 @@
#define NO_UINT32_MACROS
#include "uint32.h"
#include <endian.h>
void uint32_pack_big(char *out,uint32 in) {
out[3]=in&0xff; in>>=8;

Loading…
Cancel
Save