pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Platform Specific Code


From: Neil Hotmail
Subject: Platform Specific Code
Date: Mon, 21 Oct 2002 17:27:14 +0100

I was going to try and clean up the platform specific code, so before I do I
thought I'd check what can be done.

Basically, I would like to remove all #ifdef WIN32 statements, and make it
so that Pingu's is a general program with specific include files for
Windows/Linux/Whatever it gets ported to, instead of being Linux based with
some Windows hacks. This will probably help getting it ported to elsewhere,
but even if it doesn't its the "right thing" to do.

I think the best way to do this would be to have a #include file for each
platform, and a different directory for each platform, there is already a
Win32 directory, so I would like to add a Linux one.

The #include files could have:

const char* PathSeparator = "\\"
void ShowURL(std::string& url) //open a browser
#define chdir _chdir
void MakeDirectory(std::string& path)

Also: system.cxx is badly implemented in my opinion - would it not be better
to have separate files for each OS implementing system?

I am quite happy to do this work, but I thought I'd better ask first, as it
is a quite major reorganisation.


Ginge







reply via email to

[Prev in Thread] Current Thread [Next in Thread]