Some warnings.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3227
This commit is contained in:
parent
e3c5fe0708
commit
2314183f15
16 changed files with 93 additions and 104 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: cdrom_image.cpp,v 1.22 2008-09-29 17:50:18 c2woody Exp $ */
|
||||
/* $Id: cdrom_image.cpp,v 1.23 2008-10-05 14:44:52 qbix79 Exp $ */
|
||||
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
|
@ -131,7 +131,7 @@ int CDROM_Interface_Image::AudioFile::getLength()
|
|||
int CDROM_Interface_Image::refCount = 0;
|
||||
CDROM_Interface_Image* CDROM_Interface_Image::images[26];
|
||||
CDROM_Interface_Image::imagePlayer CDROM_Interface_Image::player = {
|
||||
NULL, NULL, NULL, 0, 0, 0, 0, 0, false, false };
|
||||
NULL, NULL, NULL, {0}, 0, 0, 0, false, false };
|
||||
|
||||
|
||||
CDROM_Interface_Image::CDROM_Interface_Image(Bit8u subUnit)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dev_con.h,v 1.33 2007-09-20 16:42:43 c2woody Exp $ */
|
||||
/* $Id: dev_con.h,v 1.34 2008-10-05 14:44:52 qbix79 Exp $ */
|
||||
|
||||
#include "dos_inc.h"
|
||||
#include "../ints/int10.h"
|
||||
|
@ -392,7 +392,7 @@ Bit16u device_CON::GetInformation(void) {
|
|||
if (head>=end) head=start;
|
||||
mem_writew(BIOS_KEYBOARD_BUFFER_HEAD,head);
|
||||
return 0x80D3; /* No Key Available */
|
||||
};
|
||||
}
|
||||
|
||||
device_CON::device_CON() {
|
||||
SetName("CON");
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_execute.cpp,v 1.64 2008-09-07 10:55:14 c2woody Exp $ */
|
||||
/* $Id: dos_execute.cpp,v 1.65 2008-10-05 14:44:52 qbix79 Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
@ -215,7 +215,7 @@ bool DOS_NewPSP(Bit16u segment, Bit16u size) {
|
|||
// copy command line as well (Kings Quest AGI -cga switch)
|
||||
psp.SetCommandTail(RealMake(parent_psp_seg,0x80));
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
bool DOS_ChildPSP(Bit16u segment, Bit16u size) {
|
||||
DOS_PSP psp(segment);
|
||||
|
@ -225,7 +225,7 @@ bool DOS_ChildPSP(Bit16u segment, Bit16u size) {
|
|||
psp.SetEnvironment(psp_parent.GetEnvironment());
|
||||
psp.SetSize(size);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
static void SetupPSP(Bit16u pspseg,Bit16u memsize,Bit16u envseg) {
|
||||
/* Fix the PSP for psp and environment MCB's */
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_files.cpp,v 1.101 2008-09-21 19:42:47 c2woody Exp $ */
|
||||
/* $Id: dos_files.cpp,v 1.102 2008-10-05 14:44:52 qbix79 Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -329,7 +329,7 @@ bool DOS_ReadFile(Bit16u entry,Bit8u * data,Bit16u * amount) {
|
|||
bool ret=Files[handle]->Read(data,&toread);
|
||||
*amount=toread;
|
||||
return ret;
|
||||
};
|
||||
}
|
||||
|
||||
bool DOS_WriteFile(Bit16u entry,Bit8u * data,Bit16u * amount) {
|
||||
Bit32u handle=RealHandle(entry);
|
||||
|
@ -352,7 +352,7 @@ bool DOS_WriteFile(Bit16u entry,Bit8u * data,Bit16u * amount) {
|
|||
bool ret=Files[handle]->Write(data,&towrite);
|
||||
*amount=towrite;
|
||||
return ret;
|
||||
};
|
||||
}
|
||||
|
||||
bool DOS_SeekFile(Bit16u entry,Bit32u * pos,Bit32u type) {
|
||||
Bit32u handle=RealHandle(entry);
|
||||
|
@ -365,7 +365,7 @@ bool DOS_SeekFile(Bit16u entry,Bit32u * pos,Bit32u type) {
|
|||
return false;
|
||||
};
|
||||
return Files[handle]->Seek(pos,type);
|
||||
};
|
||||
}
|
||||
|
||||
bool DOS_CloseFile(Bit16u entry) {
|
||||
Bit32u handle=RealHandle(entry);
|
||||
|
@ -388,6 +388,7 @@ bool DOS_CloseFile(Bit16u entry) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DOS_FlushFile(Bit16u entry) {
|
||||
Bit32u handle=RealHandle(entry);
|
||||
if (handle>=DOS_FILES) {
|
||||
|
@ -660,7 +661,7 @@ bool DOS_DuplicateEntry(Bit16u entry,Bit16u * newentry) {
|
|||
Files[handle]->AddRef();
|
||||
psp.SetFileHandle(*newentry,handle);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
bool DOS_ForceDuplicateEntry(Bit16u entry,Bit16u newentry) {
|
||||
if(entry == newentry) {
|
||||
|
@ -684,7 +685,7 @@ bool DOS_ForceDuplicateEntry(Bit16u entry,Bit16u newentry) {
|
|||
Files[orig]->AddRef();
|
||||
psp.SetFileHandle(newentry,orig);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1116,7 +1117,7 @@ bool DOS_SetDrive(Bit8u drive) {
|
|||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
bool DOS_GetFileDate(Bit16u entry, Bit16u* otime, Bit16u* odate) {
|
||||
Bit32u handle=RealHandle(entry);
|
||||
|
@ -1135,7 +1136,7 @@ bool DOS_GetFileDate(Bit16u entry, Bit16u* otime, Bit16u* odate) {
|
|||
*otime = Files[handle]->time;
|
||||
*odate = Files[handle]->date;
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
void DOS_SetupFiles (void) {
|
||||
/* Setup the File Handles */
|
||||
|
|
|
@ -386,7 +386,7 @@ bool DOS_LinkUMBsToMemChain(Bit16u linkstate) {
|
|||
static Bitu DOS_default_handler(void) {
|
||||
LOG(LOG_CPU,LOG_ERROR)("DOS rerouted Interrupt Called %X",lastint);
|
||||
return CBRET_NONE;
|
||||
};
|
||||
}
|
||||
|
||||
static CALLBACK_HandlerObject callbackhandler;
|
||||
void DOS_SetupMemory(void) {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_misc.cpp,v 1.20 2008-09-07 10:55:14 c2woody Exp $ */
|
||||
/* $Id: dos_misc.cpp,v 1.21 2008-10-05 14:44:52 qbix79 Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
#include "callback.h"
|
||||
|
@ -50,13 +50,12 @@ static Bitu INT2F_Handler(void) {
|
|||
|
||||
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:Multiplex Unhandled call %4X",reg_ax);
|
||||
return CBRET_NONE;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
static Bitu INT2A_Handler(void) {
|
||||
|
||||
return CBRET_NONE;
|
||||
};
|
||||
}
|
||||
|
||||
static bool DOS_MultiplexFunctions(void) {
|
||||
switch (reg_ax) {
|
||||
|
@ -214,4 +213,4 @@ void DOS_SetupMisc(void) {
|
|||
call_int2a=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_int2a,&INT2A_Handler,CB_IRET,"DOS Int 2a");
|
||||
RealSetVec(0x2A,CALLBACK_RealPointer(call_int2a));
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: drive_local.cpp,v 1.77 2008-09-07 10:55:14 c2woody Exp $ */
|
||||
/* $Id: drive_local.cpp,v 1.78 2008-10-05 14:44:52 qbix79 Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -76,7 +76,7 @@ bool localDrive::FileCreate(DOS_File * * file,char * name,Bit16u attributes) {
|
|||
*file=new localFile(name,hand);
|
||||
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
bool localDrive::FileOpen(DOS_File * * file,char * name,Bit32u flags) {
|
||||
const char* type;
|
||||
|
@ -113,7 +113,7 @@ bool localDrive::FileOpen(DOS_File * * file,char * name,Bit32u flags) {
|
|||
(*file)->flags=flags; //for the inheritance flag and maybe check for others.
|
||||
// (*file)->SetFileName(newname);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
FILE * localDrive::GetSystemFilePtr(char const * const name, char const * const type) {
|
||||
|
||||
|
@ -304,7 +304,7 @@ bool localDrive::GetFileAttr(char * name,Bit16u * attr) {
|
|||
}
|
||||
*attr=0;
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
bool localDrive::MakeDir(char * dir) {
|
||||
char newdir[CROSS_LEN];
|
||||
|
@ -364,7 +364,7 @@ bool localDrive::Rename(char * oldname,char * newname) {
|
|||
if (temp==0) dirCache.CacheOut(newnew);
|
||||
return (temp==0);
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
bool localDrive::AllocationInfo(Bit16u * _bytes_sector,Bit8u * _sectors_cluster,Bit16u * _total_clusters,Bit16u * _free_clusters) {
|
||||
/* Always report 100 mb free should be enough */
|
||||
|
@ -374,7 +374,7 @@ bool localDrive::AllocationInfo(Bit16u * _bytes_sector,Bit8u * _sectors_cluster,
|
|||
*_total_clusters=allocation.total_clusters;
|
||||
*_free_clusters=allocation.free_clusters;
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
bool localDrive::FileExists(const char* name) {
|
||||
char newname[CROSS_LEN];
|
||||
|
@ -450,7 +450,7 @@ bool localFile::Read(Bit8u * data,Bit16u * size) {
|
|||
Bit8u mask = IO_Read(0x21);
|
||||
if(mask & 0x4 ) IO_Write(0x21,mask&0xfb);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
bool localFile::Write(Bit8u * data,Bit16u * size) {
|
||||
if (last_action==READ) fseek(fhandle,ftell(fhandle),SEEK_SET);
|
||||
|
@ -464,6 +464,7 @@ bool localFile::Write(Bit8u * data,Bit16u * size) {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool localFile::Seek(Bit32u * pos,Bit32u type) {
|
||||
int seektype;
|
||||
switch (type) {
|
||||
|
@ -556,8 +557,7 @@ bool MSCDEX_GetVolumeName(Bit8u subUnit, char* name);
|
|||
|
||||
|
||||
cdromDrive::cdromDrive(const char driveLetter, const char * startdir,Bit16u _bytes_sector,Bit8u _sectors_cluster,Bit16u _total_clusters,Bit16u _free_clusters,Bit8u _mediaid, int& error)
|
||||
:localDrive(startdir,_bytes_sector,_sectors_cluster,_total_clusters,_free_clusters,_mediaid)
|
||||
{
|
||||
:localDrive(startdir,_bytes_sector,_sectors_cluster,_total_clusters,_free_clusters,_mediaid) {
|
||||
// Init mscdex
|
||||
error = MSCDEX_AddDrive(driveLetter,startdir,subUnit);
|
||||
strcpy(info, "CDRom ");
|
||||
|
@ -566,10 +566,9 @@ cdromDrive::cdromDrive(const char driveLetter, const char * startdir,Bit16u _byt
|
|||
// Get Volume Label
|
||||
char name[32];
|
||||
if (MSCDEX_GetVolumeName(subUnit,name)) dirCache.SetLabel(name,true,true);
|
||||
};
|
||||
}
|
||||
|
||||
bool cdromDrive::FileOpen(DOS_File * * file,char * name,Bit32u flags)
|
||||
{
|
||||
bool cdromDrive::FileOpen(DOS_File * * file,char * name,Bit32u flags) {
|
||||
if ((flags&3)==OPEN_READWRITE) {
|
||||
flags &= ~OPEN_READWRITE;
|
||||
} else if ((flags&3)==OPEN_WRITE) {
|
||||
|
@ -579,47 +578,40 @@ bool cdromDrive::FileOpen(DOS_File * * file,char * name,Bit32u flags)
|
|||
bool retcode = localDrive::FileOpen(file,name,flags);
|
||||
if(retcode) (dynamic_cast<localFile*>(*file))->FlagReadOnlyMedium();
|
||||
return retcode;
|
||||
};
|
||||
}
|
||||
|
||||
bool cdromDrive::FileCreate(DOS_File * * file,char * name,Bit16u attributes)
|
||||
{
|
||||
bool cdromDrive::FileCreate(DOS_File * * file,char * name,Bit16u attributes) {
|
||||
DOS_SetError(DOSERR_ACCESS_DENIED);
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
bool cdromDrive::FileUnlink(char * name)
|
||||
{
|
||||
bool cdromDrive::FileUnlink(char * name) {
|
||||
DOS_SetError(DOSERR_ACCESS_DENIED);
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
bool cdromDrive::RemoveDir(char * dir)
|
||||
{
|
||||
bool cdromDrive::RemoveDir(char * dir) {
|
||||
DOS_SetError(DOSERR_ACCESS_DENIED);
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
bool cdromDrive::MakeDir(char * dir)
|
||||
{
|
||||
bool cdromDrive::MakeDir(char * dir) {
|
||||
DOS_SetError(DOSERR_ACCESS_DENIED);
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
bool cdromDrive::Rename(char * oldname,char * newname)
|
||||
{
|
||||
bool cdromDrive::Rename(char * oldname,char * newname) {
|
||||
DOS_SetError(DOSERR_ACCESS_DENIED);
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
bool cdromDrive::GetFileAttr(char * name,Bit16u * attr)
|
||||
{
|
||||
bool cdromDrive::GetFileAttr(char * name,Bit16u * attr) {
|
||||
bool result = localDrive::GetFileAttr(name,attr);
|
||||
if (result) *attr |= DOS_ATTR_READ_ONLY;
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
bool cdromDrive::FindFirst(char * _dir,DOS_DTA & dta,bool fcb_findfirst)
|
||||
{
|
||||
bool cdromDrive::FindFirst(char * _dir,DOS_DTA & dta,bool fcb_findfirst) {
|
||||
// If media has changed, reInit drivecache.
|
||||
if (MSCDEX_HasMediaChanged(subUnit)) {
|
||||
dirCache.EmptyCache();
|
||||
|
@ -628,10 +620,9 @@ bool cdromDrive::FindFirst(char * _dir,DOS_DTA & dta,bool fcb_findfirst)
|
|||
if (MSCDEX_GetVolumeName(subUnit,name)) dirCache.SetLabel(name,true,true);
|
||||
}
|
||||
return localDrive::FindFirst(_dir,dta);
|
||||
};
|
||||
}
|
||||
|
||||
void cdromDrive::SetDir(const char* path)
|
||||
{
|
||||
void cdromDrive::SetDir(const char* path) {
|
||||
// If media has changed, reInit drivecache.
|
||||
if (MSCDEX_HasMediaChanged(subUnit)) {
|
||||
dirCache.EmptyCache();
|
||||
|
@ -640,7 +631,7 @@ void cdromDrive::SetDir(const char* path)
|
|||
if (MSCDEX_GetVolumeName(subUnit,name)) dirCache.SetLabel(name,true,true);
|
||||
}
|
||||
localDrive::SetDir(path);
|
||||
};
|
||||
}
|
||||
|
||||
bool cdromDrive::isRemote(void) {
|
||||
return true;
|
||||
|
|
|
@ -98,12 +98,12 @@ bool Virtual_File::Read(Bit8u * data,Bit16u * size) {
|
|||
}
|
||||
file_pos+=*size;
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
bool Virtual_File::Write(Bit8u * data,Bit16u * size){
|
||||
/* Not really writeable */
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
bool Virtual_File::Seek(Bit32u * new_pos,Bit32u type){
|
||||
switch (type) {
|
||||
|
@ -122,11 +122,11 @@ bool Virtual_File::Seek(Bit32u * new_pos,Bit32u type){
|
|||
}
|
||||
*new_pos=file_pos;
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
bool Virtual_File::Close(){
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Bit16u Virtual_File::GetInformation(void) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue