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

[MiNT] appl_getinfo(APGI_VERSION(=96)) implementation

 Hello all,

 I have now implemented appl_getinf(96) like this;

 appl_getinfo(96, aes_id, long_name, version, status, arch),

 where aes_id is the short name, space-padded to fit 8-bytes, for
example "   XaAES".
Long_name is a null-terminated string filled with a more descriptive
info-line, for xaaes now "XaAES - a MultiTasking AES for MiNT".
version is filled with ascii version string "v0.992", null terminated.
XaAES will never copy more than 256 bytes into any of the pointers
passed. (except from aes_id, which ofcourse never gets 8-bytes).

 If addrin[3] is not NULL, the AES fills status with an asci string
describing the current status of the AES. For example "Beta", "Release",

 if addrin[4] is not NULL, the AES fills arch with an ascii string
describing the architechture for which the AES was compiled, for example
"m68k", "pegasos PPC", etc.

 In addition to this, ap_gout[1-4] is filled out as follows regardless
of wether control[N_ADDRIN] is NULL indicating no ascii-info wanted, or
>= 5;

 ap_gout1 = Minor version number
 ap_gout2 = Major version number
 ap_gout3 = Status (for example, 0 means stable, 1 means beta, 2 means
            alpha etc.)
 ap_gout4 = Arch (for example, 0 means m68k, 1 means pegasos ppc, etc)


  control[0]   130         Opcode
  control[1]     1         Elements in intin
  control[2]     5         Elements in intout
  control[3]     0 or 5    Elements in addrin
  control[4]     0         Elements in addrout

  intin[0]       96 (APGI_VERSION)

  addrin[0]     Pointer to 8-byte large buffer to receive aes ID or NULL
  addrin[1]     Pointer to a buffer the AES fills with a string
                describing the AES or NULL
  addrin[2]     Pointer to a buffer the AES fills in with ascii version
                string, or NULL
  addrin[3]     Pointer to a buffer the AES fills with a string
                describing the development status, or NULL
  addrin[4]     Pointer to a buffer the AES fill with a string
                describing the target architecture.

 All buffers, except the one pointed to by addrin[0], should be made to
accept up to 256 (255 + 0 termination) characters.

  intout[0]     Return value 0 = Failure, 1 = success
  intout[1]     Major version number
  intout[2]     Minor version number
  intout[3]     Status (Development status)
  intout[4]     Architecture

 This way only one call is necessary to get all info. I hope this is OK
for you, as i have already implemented it. I have not checked it in, and
wont do so until we agree its OK.. or if changes are necessary...

 Best Regards

Odd Skancke