Skip to content

Commit

Permalink
Remove trailing white space
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.savannah.gnu.org/mtools/trunk@637 8fbfe7c3-7cdf-472d-ae67-d119146b2a64
  • Loading branch information
Alain Knaff committed Jul 10, 2021
1 parent ea7031b commit 19572b7
Show file tree
Hide file tree
Showing 80 changed files with 778 additions and 779 deletions.
12 changes: 6 additions & 6 deletions buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ typedef struct Buffer_t {
int refs;
Stream_t *Next;
Stream_t *Buffer;

size_t size; /* size of read/write buffer */
int dirty; /* is the buffer dirty? */

Expand Down Expand Up @@ -152,10 +152,10 @@ static ssize_t buf_read(Stream_t *Stream, char *buf, mt_off_t start, size_t len)
size_t offset;
char *disk_ptr;
ssize_t ret;
DeclareThis(Buffer_t);
DeclareThis(Buffer_t);

if(!len)
return 0;
return 0;

/*fprintf(stderr, "buf read %x %x %x\n", Stream, start, len);*/
switch(isInBuffer(This, start, &len)) {
Expand Down Expand Up @@ -196,7 +196,7 @@ static ssize_t buf_write(Stream_t *Stream, char *buf,
mt_off_t start, size_t len)
{
char *disk_ptr;
DeclareThis(Buffer_t);
DeclareThis(Buffer_t);
size_t offset=0;

if(!len)
Expand All @@ -223,7 +223,7 @@ static ssize_t buf_write(Stream_t *Stream, char *buf,
size_t readSize;
ssize_t ret;
size_t bytes_read;

readSize = This->cylinderSize -
(size_t)(This->current % (mt_off_t) This->cylinderSize);

Expand Down Expand Up @@ -291,7 +291,7 @@ static ssize_t buf_write(Stream_t *Stream, char *buf,
This->dirty_pos = ROUND_DOWN(offset, This->sectorSize);
if(!This->dirty || offset + len > This->dirty_end)
This->dirty_end = ROUND_UP(offset + len, This->sectorSize);

if(This->dirty_end > This->cur_size) {
fprintf(stderr,
"Internal error, dirty end too big dirty_end=%x cur_size=%x len=%x offset=%d sectorSize=%x\n",
Expand Down
4 changes: 2 additions & 2 deletions buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

#include "stream.h"

Stream_t *buf_init(Stream_t *Next,
size_t size,
Stream_t *buf_init(Stream_t *Next,
size_t size,
size_t cylinderSize,
size_t sectorSize);

Expand Down
10 changes: 5 additions & 5 deletions byte_dword.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ static Dword byte2dword(Byte* val)
{
Dword l;
l = (Dword)((val[0] << 24) + (val[1] << 16) + (val[2] << 8) + val[3]);

return l;
}
}

UNUSED(static int32_t byte2sdword(Byte* val))
{
int32_t l;
l = (int32_t)((val[0] << 24) + (val[1] << 16) + (val[2] << 8) + val[3]);

return l;
}
}


UNUSED(static Qword byte2qword(Byte* val))
Expand All @@ -47,7 +47,7 @@ UNUSED(static Qword byte2qword(Byte* val))
l = (l << 8) | val[6];
l = (l << 8) | val[7];
return l;
}
}

static void dword2byte(Dword parm, Byte* rval)
{
Expand Down
22 changes: 11 additions & 11 deletions charsetConv.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* Copyright 2008,2009 Alain Knaff.
* This file is part of mtools.
*
*
* Mtools is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Mtools is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Mtools is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
Expand Down Expand Up @@ -61,7 +61,7 @@ static int try(const char *testCp) {
size_t outbufLen = 2*sizeof(char);
iconv_t test = 0;
size_t i;

for(i=0; i < sizeof(asciiTries) / sizeof(asciiTries[0]); i++) {
test = iconv_open(asciiTries[i], testCp);
if(test != (iconv_t) -1)
Expand All @@ -88,7 +88,7 @@ static int try(const char *testCp) {
static const char *getWcharCp(void) {
unsigned int i;
if(wcharCp != NULL)
return wcharCp;
return wcharCp;
for(i=0; i< sizeof(wcharTries) / sizeof(wcharTries[0]); i++) {
if(try(wcharTries[i]))
return (wcharCp=wcharTries[i]);
Expand Down Expand Up @@ -158,7 +158,7 @@ size_t dos_to_wchar(doscp_t *cp, const char *dos, wchar_t *wchar, size_t len)
size_t in_len=len;
size_t out_len=len*sizeof(wchar_t);
wchar_t *dptr=wchar;
char *dos2 = (char *) dos; /* Magic to be able to call iconv with its
char *dos2 = (char *) dos; /* Magic to be able to call iconv with its
buggy prototype */
r=iconv(cp->from, &dos2, &in_len, (char **)&dptr, &out_len);
if(r == (size_t) -1)
Expand Down Expand Up @@ -193,7 +193,7 @@ static size_t safe_iconv(iconv_t conv, const wchar_t *wchar, char *dest,

if(out_len <= 0)
break;
if(dptr)
if(dptr)
*dptr++ = '_';
in_len -= sizeof(wchar_t);

Expand Down Expand Up @@ -317,7 +317,7 @@ static inline size_t wcrtomb(char *s, wchar_t wc, mbstate_t *ps)
return 1;
}

static inline size_t mbrtowc(wchar_t *pwc, const char *s,
static inline size_t mbrtowc(wchar_t *pwc, const char *s,
size_t n, mbstate_t *ps)
{
*pwc = *s;
Expand Down
2 changes: 1 addition & 1 deletion codepage.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

typedef struct Codepage_l {
int nr;
int nr;
unsigned char tounix[128];
} Codepage_t;

Expand Down
8 changes: 4 additions & 4 deletions codepages.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Codepage_t codepages[]= {
"ÓßÔÒõÕµþÞÚÙýÝÞ¯´"
"­±_¾¶§÷¸°¨·¹³²__"
},

{ 852,
"ÇüéâäucçlëÕõîZÄC"
"ÉLlôöLlSsÖÜTtL×c"
Expand All @@ -64,7 +64,7 @@ Codepage_t codepages[]= {
"ÓßÔNnñSsRÚrUýÝt´"
"­~.~~§÷¸°¨·¹uRr_"
},

{ 860,
"ÇüéâãàåçêëèÍõìÃÂ"
"ÉÀÈôõòÚùÌÕÜ¢£ÙPÓ"
Expand All @@ -75,7 +75,7 @@ Codepage_t codepages[]= {
"abgpSsµtftodøØ_N"
"=±<>||÷~°··Vn²__"
},

{ 863,
"ÇüéâÂà¶çêëèïî_À§"
"ÉÈÊôËÏûù¤ÔÜ¢£ÙÛf"
Expand All @@ -86,7 +86,7 @@ Codepage_t codepages[]= {
"abgpSsµtftodøØ_N"
"=±<>||÷~°··Vn²__"
},

{ 865,
"ÇüéâäàåçêëèïîìÄÅ"
"ÉæÆôöòûùÿÖÜø£ØPf"
Expand Down
16 changes: 8 additions & 8 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static unsigned int flag_mask; /* mask of currently set flags */
static unsigned int cur_devs; /* current number of defined devices */
static int cur_dev; /* device being filled in. If negative, none */
static int trusted=0; /* is the currently parsed device entry trusted? */
static unsigned int nr_dev; /* number of devices that the current table can
static unsigned int nr_dev; /* number of devices that the current table can
hold */
struct device *devices; /* the device table */
static int token_nr; /* number of tokens in line */
Expand Down Expand Up @@ -305,7 +305,7 @@ static int mtools_getline(void)
syntax("line too long", 1);
return 0;
}

static void skip_junk(int expect)
{
lastTokenLinenumber = linenumber;
Expand Down Expand Up @@ -442,7 +442,7 @@ static void grow(void)
}
}
}


static void init_drive(void)
{
Expand Down Expand Up @@ -673,13 +673,13 @@ static void parse_old_device_line(char drive)
long offset;

int heads, sectors, tracks;

/* finish any old drive */
finish_drive_clause();

/* purge out data of old configuration files */
purge(drive, file_nr);

/* reserve slot */
append();
items = sscanf(token,"%c %s %i %i %i %i %li",
Expand Down Expand Up @@ -713,7 +713,7 @@ static void parse_old_device_line(char drive)
devices[cur_dev].sectors = 0;
devices[cur_dev].heads = 0;
}

devices[cur_dev].drive = ch_canon_drv(devices[cur_dev].drive);
maintain_default_drive(devices[cur_dev].drive);
if (!(devices[cur_dev].name = strdup(name))) {
Expand Down Expand Up @@ -745,7 +745,7 @@ static int parse_one(int privilege)
syntax("drive letter expected", 0);

if(action==1 || action==4)
/* replace existing drive */
/* replace existing drive */
purge(token[0], file_nr);
if(action==4)
return 1;
Expand Down Expand Up @@ -822,7 +822,7 @@ void read_config(void)
char *envConfFile;
static char conf_file[MAXPATHLEN+sizeof(CFG_FILE1)];


/* copy compiled-in devices */
file_nr = 0;
cur_devs = nr_const_devices;
Expand Down
Loading

0 comments on commit 19572b7

Please sign in to comment.