Mail Archives: djgpp/1997/09/21/17:03:17
Hi all. when I try to get the file --> mapping.o I get the fellow error:
gcc -c ../src/gadgets/mapping.c
../src/gadgets/mapping.cc: In Method 'void Tmapping::GetMemory()'
../src/gadgets/mapping.cc:stray '\' in program
The code is:
void TMapping::GetMemory(void)
{ TScreenBitmap::GetMemory();
//
int size=W*H;
Descr=NULL;
if (size) SafeNew(Descr,char"size"); <------------------
}
And the Header file is:
/* --------------------------------------------------------------------------
SubSystem : Screen graphics management
File : Include/Gadgets/Mapping.H
Overview : TMapping Object : How to display bitmap
** ------------------------------------------------------------------------*/
#ifndef _GADGETS_MAPPING_H_
#define _GADGETS_MAPPING_H_
void InitMapping();
void DoneMapping();
// --- TScreenBitmap
extern short RegTScreenBitmap;
extern char *IdentTScreenBitmap;
class TScreenBitmap : public TAtom
{ DECLARE(TScreenBitmap);
// -- Datas
protected:
GrContext *GC;
int W,H;
// -- Methods
public:
// public Constructors
TScreenBitmap();
TScreenBitmap(int Width, int Height);
// Creation / Destruction
void Defaults(void);
void Init(int Width, int Height);
void Done();
void NewSize(int Width, int Height);
virtual void FreeMemory(void);
virtual void GetMemory(void);
// Put bitmap on the screen
void Draw(int X, int Y);
void Draw(int Xs, int Ys, int Xd, int Yd, int Wd, int Hd);
// Data access
void BeginDraw(void);
void EndDraw(void);
int Width();
int Height();
// Objects streams
virtual void Read(TDisk *file);
virtual void Write(TDisk *file);
};
// --- TMapping
extern short RegTMapping;
extern char *IdentTMapping;
class TMapping : public TScreenBitmap
{ DECLARE(TMapping);
// -- Datas
protected:
char *Descr;
// -- Functions
public:
// Public constructors
TMapping();
TMapping(int Width, int Height, char *Description);
// Creation / Destruction
void Defaults(void);
void Init(int Width, int Height, char *Description=NULL);
virtual void FreeMemory(void);
virtual void GetMemory(void);
// Graphics
void DoMapping(TColor *ColorTable);
virtual void SetColorGroup(char ColorGroup);
// Objects streams
virtual void Read(TDisk *file);
virtual void Write(TDisk *file);
};
// -- TSysIcone
extern short RegTSysIcone;
extern char *IdentTSysIcone;
class TSysIcone : public TMapping
{ DECLARE(TSysIcone);
public:
// Public Constructors
TSysIcone();
TSysIcone(int Width, int Height, char *Description);
// Creation / Destrction
void Defaults(void);
void Init(int Width, int Height, char *Description);
// Objects streams
virtual void Read(TDisk *file);
virtual void Write(TDisk *file);
};
// -- TMappingObject
extern short RegTMappingObject;
extern char *IdentTMappingObject;
class TMappingObject : public TZone
{ DECLARE(TMappingObject);
// -- Datas
protected:
TMapping *Mapp;
boolean DeleteMapp;
// -- Functions
public:
// Public constructors
TMappingObject();
TMappingObject(int X, int Y, TMapping *_Mapp, boolean _DeleteMapp);
// Creation / Destruction
void Defaults();
void Init(int X, int Y, TMapping *_Mapp, boolean _DeleteMapp);
void Done(void);
// Graphics
virtual void Draw(TRect Clip);
};
// Inline functions
inline int TScreenBitmap::Width()
{ return W;
}
inline int TScreenBitmap::Height()
{ return H;
}
#endif // _GADGETS_MAPPING_H_
/* --------------------------------------------------------------------------
** HISTORY
** --------------------------------------------------------------------------
** 2.10:
** 20/02/96 :EN: First History remark. Copying code V2.00->V2.10
** 22/02/96 :EN: Creation of TScreenBitmap. Portability to djgpp V2
** 28/02/96 :EN: Introduction of the 'Defaults' method
** 03/03/96 :EN: Changing color scheme so that it can be user-modified
** ------------------------------------------------------------------------*/
This header is common for all the files ..... :
------------------------------------------------------>
/* ------------------------------------------------------------------
SubSystem : Basic functions usefull for all the system
File : Include/Common/Types.H
Overview : Global types and includes for the system.
** ------------------------------------------------------------------*/
#ifndef _COMMON_TYPES_H_
#define _COMMON_TYPES_H_
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#ifdef _SUNOS_
typedef void *va_list;
#else
#include <stdarg.h>
#endif
#define FALSE 0
#define TRUE 1
typedef unsigned char byte;
typedef unsigned int word;
typedef int boolean;
typedef unsigned short int word16;
typedef unsigned long int word32;
typedef short int int16;
typedef long int int32;
typedef char *PChar;
#endif // _COMMON_TYPES_H_
I get the same troble in the file ---> spy.cc
SafeNew(NewSpyLinesOffset,wordSpyAvailLines+50ู); <---------------------
SafeNew(SpyLinesOffset,word"SpyAvailLines"); <-------------------------
Could anybody tell me what's the problem .... ?
Thanks in advange ...
บบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบ
บบบ Victor Angel Huerta บบบ
บบบ vangel AT vmredipn DOT ipn DOT mx บบบ
บบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบบ
- Raw text -