www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/20/00:43:07

From: "Damian Yerrick" <web DOT poison AT pineight DOT 8m DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: [Programming: E-Mail Client] Which database
Date: Tue, 19 Oct 1999 21:14:54 -0500
Organization: Rose-Hulman Institute of Technology
Lines: 50
Sender: AFSAUTH AT 137 DOT 112 DOT 205 DOT 146
Message-ID: <7uj8m4$7be$1@solomon.cs.rose-hulman.edu>
References: <3 DOT 0 DOT 6 DOT 16 DOT 19991019111331 DOT 360fcfd4 AT mail DOT cybercable DOT fr> <3 DOT 0 DOT 6 DOT 16 DOT 19991019220116 DOT 35c76190 AT mail DOT cybercable DOT fr>
NNTP-Posting-Host: 137.112.205.146
X-Trace: solomon.cs.rose-hulman.edu 940385796 7534 137.112.205.146 (20 Oct 1999 02:16:36 GMT)
X-Complaints-To: news AT cs DOT rose-hulman DOT edu
NNTP-Posting-Date: 20 Oct 1999 02:16:36 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Michelle Konzack <starone AT cybercable DOT fr> wrote in message
news:3 DOT 0 DOT 6 DOT 16 DOT 19991019220116 DOT 35c76190 AT mail DOT cybercable DOT fr...
> Hello Eli and good evening/afternoon
>
> Can you explain me what is

I'll explain what Eli said in terms of Shawn Hargreaves's
graphics and sound library Allegro.
http://www.talula.demon.co.uk/allegro/

>         "define a high-level abstract layer of functions"

Create a common allegro.h

> And with
>
>         "make every platform provide a platformspecific
>         implementation of those functions"
>
> You mean I must program my e.g. main.c and for every OS I
> like to compile I must program a dos.c or linux.c with the
> same functions but correspond to the platform ???

Write general wrappers that call platform-specific
drivers. A graphics and sound library would do this:

To implement graphics functions:
The DOS version would use vesa.c
The Windows version would use directx.c
The Linux version would use xwindows.c or fbcon.c

To implement waves and MIDI:
All would use sound.c (a wrapper)
The DOS version would use sb.c
The Windows version would use mci.c

> and then I must compile the ensemble "main.c + dos.c" and
> "main.c + linux.c"

Yes. You seem to understand now.

--
Damian Yerrick
CM 398, Rose-Hulman Institute of Technology
5500 Wabash Ave
Terre Haute, IN 47803
http://come.to/yerrick


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019