Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
192 user(s) are online (122 user(s) are browsing Forums)

Members: 0
Guests: 192

more...

Headlines

Forum Index


Board index » All Posts (thomas)




Re: Environmental variables - Library?
Not too shy to talk
Not too shy to talk



Do *not* use file i/o on environment variables!

In a Shell you can use Set or SetEnv without arguments to print all variables.

In a program you use

GetVar
SetVar
DeleteVar
FindVar
ScanVars

of dos.library

Go to top


Re: How to relay a varargs function? [SOLVED]
Not too shy to talk
Not too shy to talk


@Deniil

If you have a 68k program containing something like this:

ULONG DoSomething (APTR object,struct TagItem *TagList);

ULONG DoSomethingTags (APTR object,Tag tag1,...)
{
return (
DoSomething (object,(struct TagItem *)&tag1));
}


to work on OS4 you have to change it like this:

#include <stdarg.h>

ULONG DoSomething (APTR object,struct TagItem *TagList);

VARARGS68K ULONG DoSomethingTags (APTR object,...)
{
ULONG result;
va_list args;
va_startlinear (args,object);
result DoSomething (object,va_getlinearva(args,struct TagItem *));
va_end (args);
return (
result);
}


Go to top


Re: Source code of jpeg.library?
Not too shy to talk
Not too shy to talk


@Deniil

You could ask Darius Brewka who made the OS4 port: http://os4depot.net/index.php?functio ... library/misc/jpeg_lib.lha

IIRC the original author was not willing to make it open-source.

Go to top


Re: Partition table for external drive
Not too shy to talk
Not too shy to talk


Quote:
is it possible to use a USB device with RDB/SFS on WinUAE


Yes, sure. You need to run WinUAE as Administrator and use the "add harddrive" option.


Go to top


Re: 68k App on OS4Depot
Not too shy to talk
Not too shy to talk



Why don't you make an OS4 version? In the best case it is just a compile run without changes to the source code.

Go to top


Re: Pick up a canceled requestfile
Not too shy to talk
Not too shy to talk


Sorry, I didn't see the missing quotation marks. The if statement has to look like this:

if "$meq ""



Go to top


Re: Pick up a canceled requestfile
Not too shy to talk
Not too shy to talk


@JosDuchIt

This should work:

set m ""
set m `REQUESTFILE TITLE="Choose your music"
if 
$m EQ "" 
   
echo "No music" 
endif


Quote:
can i test if m is set?


Yes:

get >nilm
if warn
  
echo "m is not set"
else
  echo 
"m is set to $m"
endif

Go to top


Re: Finding where a .library is allocated in memory ?
Not too shy to talk
Not too shy to talk



There shouldn't be any static or global variables in a .library. Libraries have to be reentrent.


Go to top


Re: Finding where a .library is allocated in memory ?
Not too shy to talk
Not too shy to talk



I find this a rather strange idea. Trashed memory is usually caused by writing beying allocated memory. You can use a utility like Mungwall to find these hits.

Anyway, you can just reference any label in your program, for example like this:

#include <stdio.h>

void my_program_starts_here (void)

{
/* this is the very first routine in my program */
}

int main (void)

{

printf ("my program starts at 0x%lx\n",my_program_starts_here);

return (
0);
}


Go to top


Re: List LFORMAT %P
Not too shy to talk
Not too shy to talk


@JosDuchIt

%p outputs the path relative to the path you entered. As you didn't enter a path, %P does not make much sense without ALL.

Try either

list all lformat %p%n

or

list sys: lformat %p%n

The former will give you relative paths, the latter will precede each file name by "sys:".

Works like this since ever.


Go to top


Re: Ethernet Crossover cable
Not too shy to talk
Not too shy to talk



Why do you want to bypass the router? I am quite sure that the router seperates your local network from the internet and not your local computers from each other. The LAN part of the router acts as a usual hub/switch. So you already have a permanent connection between your two Amigas. Why do you want to cut this?


Go to top


Re: Ethernet Crossover cable
Not too shy to talk
Not too shy to talk


@tonyw

I am not sure why you use "no gateway". You need at least a default route, otherwise the IP stack wouldn't know where to send packets to.

I'd use the other one as default gateway on each machine.

machine1 ip = 1.1.1.1, gateway = 2.2.2.2
machine2 ip = 2.2.2.2, gateway = 1.1.1.1



Go to top


Re: Workbench arexx port Help
Not too shy to talk
Not too shy to talk


Try

rx "options results; address workbench help; say result"

Go to top


Re: Workbench arexx port Help
Not too shy to talk
Not too shy to talk


Try

rx "options results; address workbench help; say result"

Go to top


Re: MUI : NList notify on "end of multiselection" or "Mouse-Up" event
Not too shy to talk
Not too shy to talk



Typically one would start to render on the first selection event and ignore new events while rendering is going on and when rendering has finished start rendering the last selection.

Another approach would be to start a timer when the first event arrives, then on every new event reset the timer and only when the timer comes to an end render the last selection which was received.

Go to top


Re: How to use EmulateTags() call
Not too shy to talk
Not too shy to talk



Actually it should be sufficient to try GetInterface(LibBase,"main"). If it fails, call the 68k functions with EmulateTags and if not, call the functions from the interface.


Go to top


Re: How to use EmulateTags() call
Not too shy to talk
Not too shy to talk



If you call the library like this, you expect that there never will be a ppc native version of boards.library. Is this what you want? Otherwise you should rather create a boards.l.main and use the ppc native interface.

Regarding EmulateTags, I guess you have to add ET_RegisterA6,BoardsBase.


Go to top


Re: dopus4 copying = DOS error code 212 - object is not of required type ??
Not too shy to talk
Not too shy to talk



DOpus4 cannot handle links. At least not in the publicly available versions. I did not try the one mentioned here.


Go to top


Re: how to deal with old __aligned attribute ?
Not too shy to talk
Not too shy to talk



FileInfoBlock and AnchorPath should be allocated with AllocDosObject. Declaring them as auto variables is deprecated already since OS 1.2.

An example for correct usage of MatchFirst / MatchNext is in the autodocs.

Using __aligned with a char or UBYTE is nonsense IMHO. Bytes are always aligned to byte boundary. Only multi-byte datatypes need special alignment.


Go to top


Re: how replace fast mathffp.library and mathtrans.library on os4 ?
Not too shy to talk
Not too shy to talk


float SPFlt(int inum)
{
return (
inum);
}


int SPFix(float fnum)
{
return (
fnum);
}


float SPSub(float fnum1float fnum2)
{
return (
fnum1 fnum2);
}


float SPMul(float fnum1float fnum2)
{
return (
fnum1 fnum 2);
}


float SPDiv(float fnum1float fnum2)
{
return (
fnum1 fnum2);
}


float SPSincos(float *pfnum2float fnum1)
{
*
pfnum2 cos(fnum1);
return (
sin(fnum1));
}


(just derived from the autodocs; not tested!)

Go to top



TopTop
« 1 2 (3) 4 5 6 ... 14 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project