|
84734 packages online
|
|
|
|
dev/c/C_V43-DT.lha |
|
No screenshot available
|
|
samplePNM.datatype and source-code V43.21 (18.3.2008)
(C) 1996-2008 by Andreas R. Kleinert. All rights reserved.
---
This small sample datatype source code demonstrates, how to completely
write an Amiga OS 3 datatype (V40/V43) without any assembler stubs
or compiler/linker tricks in PURE C source code (currently SAS/C-based:
see Aminet:dev/c/CLib37x.LHA on how to adjust for some other compilers).
You may e.g. use this example source code to write more portable
Amiga OS 3 datatypes to allow easier porting of these
to other Amiga OS-derived operating systems, or the native
OS of an upcoming PowerPC Amiga.
Translate your 68k-assembler datatype startup-codes smartly
to C by simply using this source-code as an advice how to do it.
As a common case, a datatype of class picture, supporting
PNM-PGM (P5) and PNM-PPM (P6) has been used as an example.
With picture.datatype V40-42 only PGM is supported,
and with picture.datatype V43 reading of PPM is offered as well,
while encountering an PGM file under V43 causes a fallback to V40
routines (could have been done differently, but was not necessary
here just for demonstration).
For testing this datatype, simply use a tool from the NetPBM package
(or maybe for example a tool supporting superview.library) and save
a graphics in the binary PGM or PPM format (P5/P6 of the PNM series).
Then install this datatype and try loading the file via MultiView.
Should work fine.
---
Feel free to use this source for own projects.
It is allowed to be spread and distributed anywhere, as far
as my consent is concerned.
Amiga Technologies, or the current owner of the technologie,
is allowed to always put this source on their newest
Developer CD-ROM.
Thanks and credits will always be appreciated - for example,
you MAY, but NEED NOT:
give me credits in your program's docs, send me keyfiles for
your programs using the library, and so on.
But that's simply voluntarily.
This work was only roughly inspired by David Junod's original
example source codes for datatypes.
Known Bugs: - some versions of DOpus and all Installer versions
can't fetch the version information from the
library binary due to some bugs in their code.
Newer DOpus versions have this fixed and C:Version
for example did that task always.
See also: Aminet:dev/GetVersion.lha for a fix.
History:
V43.21 (18.3.08): - fixed possible blitter race condition
- adjusted to compile with recent AOS 3.x SDKs
V43.20 (4.9.97): - fixed dispatcher again
(-> Axel Doerfler)
V43.10 (29.9.97): - added note about GetVersion.lha
- rewrote Dispatch() routine completely,
implemented new routines derived
from Roland Mainz' improved sample code
- DTM_WRITE now can be forced to its
old behaviour by specifying the hidden
prefs option "OLD_DTM_WRITE"
(IFF-ILBM then will be written without
any error code given because of
unsupported DTWR_RAW)
- etc.
V43.9 (29.6.97) : - fixed memory bug-fix (argh)
(-> Gunter Nikl)
V43.8 (24.6.97) : - again removed class dispatcher code (refresh bug)
- added "known bugs" section
- LibInit now delocates library base on error
(NULL return)
(-> Gunter Nikl)
V43.7 (14.6.97) : - fixed ftn-email address
- updated class dispatcher
(-> Roland Mainz)
V43.6 (27.3.97) : - did some finetuning
- now can simply be turned into a V40 datatype
by removing a #define (and/or the corresponding
parts of the code)
V43.5 (25.1.97) : - now explicitely checks for DTA_SourceType == DTST_File
- small changes
- updated email information
V43.4 (3.1.97) : - fixed PRI entry in resident part
- slightly changed SCOPTIONS
- fixed some style things (APTR and library casts)
- fixed a bug: bitmap would not have been freed
on temporary-buffer allocation error
- added note about library opening to L_OpenLibs()
V43.3 (30.11.96) : - added SAS/C specific Ctrl-C disabling code
- made some workarounds compiler sensitive
- redone all with SAS/C V6.57
V43.2 (3.11.96) : - there was a FreeBitMap() call missing (oops)
- it's samplePNM.dt, not samplePNG.dt ;-)
V43.1 (25.10.96) : - added picture datatype V43 support
- thus added support for 24 Bit PPM (P6),
since PGM only has 256 grayscales
- thus renamed to samplePNM.datatype
V40.3 (13.9.96) : - fixed more "style" things
V40.2 (5.9.96) : - fixed some "style" things
V40.1 (2.9.96) : - first release
---
All mentioned trademarks are subject to their owners.
|
Contents of dev/c/C_V43-DT.lha
PERMSSN UID GID PACKED SIZE RATIO METHOD CRC STAMP NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic] 2435 4684 52.0% -lh5- f2d9 Mar 18 19:19 C_V43-DT/classes/datatypes/samplePNM.datatype
[generic] 2382 5488 43.4% -lh5- c008 Mar 18 19:20 C_V43-DT/C_V43-DT.readme
[generic] 76 86 88.4% -lh5- c73d Oct 25 1996 C_V43-DT/devs/datatypes/PGM
[generic] 279 467 59.7% -lh5- e071 Oct 25 1996 C_V43-DT/devs/datatypes/PGM.info
[generic] 76 86 88.4% -lh5- 7ac9 Oct 25 1996 C_V43-DT/devs/datatypes/PPM
[generic] 279 467 59.7% -lh5- e071 Oct 25 1996 C_V43-DT/devs/datatypes/PPM.info
[generic] 102 107 95.3% -lh5- b8a4 Oct 25 1996 C_V43-DT/dt_source/CompileNote.readme
[generic] 407 1051 38.7% -lh5- d399 Mar 18 19:17 C_V43-DT/dt_source/include/class/classbase.h
[generic] 3056 12150 25.2% -lh5- 8807 Mar 18 19:19 C_V43-DT/dt_source/libfuncs.c
[generic] 301 739 40.7% -lh5- 3aed Oct 25 1996 C_V43-DT/dt_source/libfuncs.h
[generic] 1508 4912 30.7% -lh5- 5635 Mar 18 19:19 C_V43-DT/dt_source/LibInit.c
[generic] 2435 4684 52.0% -lh5- f2d9 Mar 18 19:19 C_V43-DT/dt_source/samplePNM.datatype
[generic] 139 179 77.7% -lh5- 41df Mar 18 19:17 C_V43-DT/dt_source/SCOPTIONS
[generic] 156 408 38.2% -lh5- 0478 Oct 25 1996 C_V43-DT/dt_source/smakefile
[generic] 104 119 87.4% -lh5- 85f0 Oct 25 1996 C_V43-DT/dt_source/smakefile.wth
[generic] 1217 4277 28.5% -lh5- 6c08 Jun 29 1997 C_V43-DT/dt_source/StartUp.c
[generic] 453 803 56.4% -lh5- 3394 Mar 27 1997 C_V43-DT/Readme.SAS
---------- ----------- ------- ------- ------ ---------- ------------ -------------
Total 17 files 15405 40707 37.8% Mar 18 18:55
|
|
|
|
Page generated in 0.02 seconds |
Aminet © 1992-2024 Urban
Müller and the Aminet team.
Aminet contact address: <aminetaminet net> |