Difference between revisions of "Portability issues"

From RogueBasin
Jump to navigation Jump to search
m
Line 18: Line 18:
* There are [[Operating systems]] that forbid use of certain characters within file names, most often path separators (e.g., colons in Classic [[Mac OS]]). Other characters may require "escaping" in filename references.
* There are [[Operating systems]] that forbid use of certain characters within file names, most often path separators (e.g., colons in Classic [[Mac OS]]). Other characters may require "escaping" in filename references.
* [[Operating systems]] may also restrict filename length or the total length of an absolute filepath.
* [[Operating systems]] may also restrict filename length or the total length of an absolute filepath.
* [[DOS]] and [[Windows]] use backslash as their path separator while [[UNIX]] uses slash.
* [[DOS]] and [[Windows]] use backslash as their path separator while [[UNIX]] uses slash. Most Windows APIs will understand the forward slash as a path separator, however.
[[Category:Articles]]
[[Category:Articles]]

Revision as of 04:04, 2 June 2009

Portability Issues

The purpose of this article is to collect portability issues often encountered by roguelike programmers as well as possible solutions for these problems.

Memory

Display

  • Only the characters of the basic (7bit) ASCII character set are reasonably portable. Using characters from extended character sets (like the solid blocks from the IBM DOS character set) or characters which aren't classified as printable by the ASCII standard (like the smileys from IBM DOS) will probably cause problems.
    • Extensions to ASCII are not portable. Unicode is portable, though, plus it includes all the old IBM DOS characters, though not necessarily at the same code points.
  • Output libraries discusses the options you have.

Filesystem

  • Some Operating systems (such as any that derive from or pattern UNIX or follow POSIX standards) are case-sensitive as far as filenames are concerned. Others (like DOS or Windows) are case-insensitive. Still others (like HFS , in common use on OS X) preserve case but are insensitive to it. One shouldn't rely on any one case behavior to achieve maximum portability.
  • There are Operating systems that forbid use of certain characters within file names, most often path separators (e.g., colons in Classic Mac OS). Other characters may require "escaping" in filename references.
  • Operating systems may also restrict filename length or the total length of an absolute filepath.
  • DOS and Windows use backslash as their path separator while UNIX uses slash. Most Windows APIs will understand the forward slash as a path separator, however.