Skip to content

Commit

Permalink
Revert the spectator stuff for now (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
tueda committed Dec 3, 2014
1 parent 2444eda commit 0f5a9ac
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions sources/setfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ SETUPPARAMETERS setupparameters[] =
,{(UBYTE *)"smallsize", NUMERICALVALUE, 0, (LONG)SMALLBUFFER}
,{(UBYTE *)"sortiosize", NUMERICALVALUE, 0, (LONG)SORTIOSIZE}
,{(UBYTE *)"sorttype", STRINGVALUE, 0, (LONG)lowfirst}
,{(UBYTE *)"spectatorsize", NUMERICALVALUE, 0, (LONG)SPECTATORSIZE}
,{(UBYTE *)"subfilepatches", NUMERICALVALUE, 0, (LONG)SMAXFPATCHES}
,{(UBYTE *)"sublargepatches", NUMERICALVALUE, 0, (LONG)SMAXPATCHES}
,{(UBYTE *)"sublargesize", NUMERICALVALUE, 0, (LONG)SLARGEBUFFER}
Expand Down Expand Up @@ -577,8 +576,6 @@ int AllocSetups()
AM.SMaxFpatches = sp->value;
sp = GetSetupPar((UBYTE *)"subsortiosize");
AM.SIOsize = sp->value;
sp = GetSetupPar((UBYTE *)"spectatorsize");
AM.SpectatorSize = sp->value;
/*
The next code is just for the moment (26-jan-1997) because we have
the new parts combined with the old. Once the old parts are gone
Expand Down Expand Up @@ -961,32 +958,31 @@ VOID AllocSortFileName(SORTING *sort)
#[ AllocFileHandle :
*/

FILEHANDLE *AllocFileHandle(WORD par,char *name)
FILEHANDLE *AllocFileHandle()
{
GETIDENTITY
LONG allocation, Ssize;
LONG allocation;
FILEHANDLE *fh;
int i = 0;
char *s, *t;

s = FG.fname2; i = 0;
while ( *s ) { s++; i++; }
if ( par == 0 ) { i += 16; Ssize = AM.SIOsize; }
else { s = name; while ( *s ) { i++; s++; } i+= 2; Ssize = AM.SpectatorSize; }
i += 16;
/* i += 11; */

allocation = sizeof(FILEHANDLE) + (Ssize+1)*sizeof(WORD) + i*sizeof(char);
allocation = sizeof(FILEHANDLE) + (AM.SIOsize+1)*sizeof(WORD) + i*sizeof(char);
fh = (FILEHANDLE *)Malloc1(allocation,"FileHandle");

fh->PObuffer = (WORD *)(fh+1);
fh->POstop = fh->PObuffer+Ssize;
fh->POsize = Ssize * sizeof(WORD);
fh->POstop = fh->PObuffer+AM.SIOsize;
fh->POsize = AM.SIOsize * sizeof(WORD);
fh->active = 0;
fh->handle = -1;
PUTZERO(fh->POposition);
#ifdef WITHPTHREADS
fh->pthreadslock = dummylock;
#endif
if ( par == 0 ) { /* sort file */
if ( AM.S0 != 0 ) {
fh->name = (char *)(fh->POstop + 1);
s = FG.fname2; t = fh->name;
Expand All @@ -1001,15 +997,6 @@ FILEHANDLE *AllocFileHandle(WORD par,char *name)
AN.filenum++;
}
else fh->name = 0;
}
else { /* Spectator file */
fh->name = (char *)(fh->POstop + 1);
s = FG.fname; t = fh->name;
for ( i = 0; i < FG.fnamebase; i++ ) *t++ = *s++;
s = name;
while ( *s ) *t++ = *s++;
*t = 0;
}
fh->POfill = fh->POfull = fh->PObuffer;
return(fh);
}
Expand Down

0 comments on commit 0f5a9ac

Please sign in to comment.