Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
146 user(s) are online (81 user(s) are browsing Forums)

Members: 1
Guests: 145

skynet, more...

Headlines

Forum Index


Board index » All Posts (msteed)




Re: OS4.1 native find-tool
Just popping in
Just popping in


@nbache

I've seen it work both ways, as walkero described, and as you described. A bit of experimentation worked out what is going on.

The way it seems to work is that if you click on one of the buttons next to a volume name, then that name becomes selected (it's highlighted). At that point, the space bar toggles just that selected name, and does not affect any of the other names.

The up and down arrow keys change which name is selected, and the space bar toggles that name. Pressing the down arrow key when no names are selected selects the top name in the list (and pressing escape deselects the Pattern gadget, allowing the space bar to work on the list of names instead of entering a space). Basic keyboard control.

However, if you click on the name itself and not on the button, then the name is not selected (no highlight), and the space bar then toggles all of the names.

So I guess the simplest way to do what you want is to click the top name (not button) in the list to turn it off while leaving all the names unselected, and then press space to toggle all the names. Or just save the settings as pjs suggested.


Edited by msteed on 2022/9/21 5:18:46
Go to top


Re: What
Just popping in
Just popping in


@rjd324

Quote:
If the libc is just forwarding calls to newlib.library, why is the libc in newlib so large?

I think that's a result of inefficiency in the object module format. In order to allow only those functions that are used to be linked into a program, every single function in the library has to be in its own object module.

While the actual glue code to turn a newlib call into a newlib.library call is likely not very big, there is a good deal of other overhead in the object module. Multiply that by the rather large number of functions in the library, and all that overhead adds up. (Also, I'm guessing that since libm.a is empty, the math functions are actually in libc.a as well, making it even bigger.)

Look at libauto.a. It's quite large too, and all it does is open and close libraries. But it handles a lot of different libraries, each of which requires its own object module. So again, all the overhead adds up.

Go to top


Re: What
Just popping in
Just popping in


@rjd324

Quote:
...but there is no updated to the libc linker library.

Isn't there? The libc.a in the SDK is 553,018 bytes and is dated 01-Jan-21, while the one in the latest newlib update is 684,962 bytes and is dated 10-Mar-22. Besides the later date, being significantly larger is consistent with having more functions.

Go to top


Re: OS4.1 native find-tool
Just popping in
Just popping in


@pjs

Quote:
I wasn't able to find any docs on the AmigaOS Find program either...

There is some documentation on the OS4 Documentation Wiki, though it's minimal and not entirely accurate. It does list the tooltypes (though some that it says are unused clearly are in fact used) and the command line options.

Quote:
I think I have a solution for your goal to deselect all your drives by default.

Thanks for the tip on saving the settings-- it wasn't clear what settings would be saved, so I never even tried that. It works great, removing the most annoying thing about using Find.

Note that saving the settings also saves the current location and size of Find's window, instead of the default of always centering the window on the screen and setting the size automatically. If you want to restore the default behavior, just set the MAIN_LEFT and MAIN_TOP tooltypes to CENTER, and the MAIN_WIDTH and MAIN_HEIGHT tooltypes to AUTO (or just delete those four tooltypes).

Go to top


Re: ASL file requester bug?
Just popping in
Just popping in


Quote:
If you guys check the AmiUpdate a new version of string.gadget is available...

And a new version of newlib, too-- nice!

Go to top


Re: x5000 benchmarks / speed up
Just popping in
Just popping in


@Raziel

Quote:
Apart from the last one it wipes the floor with your X5040...huh?

As noted earlier in this thread (post 36), the X1000 seems to be much faster than the X5000 at accessing memory, at least according to RageMem. Geennaam speculated (post 37) why this might be. And the author of RageMem has noted that it was designed for earlier, lower-spec NG Amigas, and may not be that accurate for X1/X5-class machines.

Go to top


Re: cURL - Downloading a site
Just popping in
Just popping in


@Raziel

Users on the IBrowse mailing list have noted that cURL and Wget both use old versions of SSL that no longer work with many websites, so perhaps that's the problem. Maybe try the verbose (-v) option and see if that provides any clues.

Go to top


Re: RadeonHD V.5 driver
Just popping in
Just popping in


@MichaelMerkel

Quote:
on the amigakit page it is written:
"RadeonHD PCI Express Graphics Card (official compatibility list)"

where is this list?

"official compatibility list" is a link. Click it and it takes you to Hans' web site. The list there is kind of dated though, and isn't specific to the V5 driver.

Go to top


Re: NTP Server (And general conflicting/confusing TIME features)
Just popping in
Just popping in


@rjd324

Quote:
Do I need "Locale"?

You definitely need Locale, as it sets many things besides the timezone.

Quote:
Sorry, but now I am confused. Can you give an example of finetuning your already set timezone.

Few people will need to do this, but there are some locations with oddball timezones that aren't covered by the world map used to set the timezone in Locale. Some timezones differ by a half hour from the adjacent timezone, for example. Or one city may be in a different timezone than the surrounding countryside. There's a reason those timezone databases don't have just 24 timezones in them.

Quote:
And, what does it mean to use "Timezone" to adjust Locale settings when surely you can just adjust your Locale settings using Locale?

I think he meant that you can tell Timezone to just use the Locale timezone setting, in which case Timezone doesn't do much. It does still control whether to use DST or not, and the advanced settings control things like whether or not to notify the user when DST changes, and whether to create the TZ variable. I'm not sure that the Enhancer setup uses Timezone, since the advanced settings tab in Time seems to accomplish much the same thing.

Quote:
I am not sure I agree with this. Time is essentially a front end to create environment variables...

Both the Hyperion and A-EON Time prefs editors allow you to sync the time by pressing a button, in additon to letting you set the time sync preferences. It's true that this is a one-time thing, and you need to use TimeGuard or Date SERVER to synchronize regularly.

Quote:
I guess I can just ignore Prefs/Time and forcefully set the $NTPSERVER through Shell / Startup every boot up.

I would imagine the variable is stored in ENVARC:, so it should persist across reboots.

Quote:
As for "Time", do I just need to get the latest one from the OS4 pure?

There was a bug fix to Date, Time (Hyperion version) and timesync.library after the release of Update 2. You can get the new versions from AmiUpdate.

Quote:
Despite the bug(s), presumably DST does not matter if you are using an NTP server.

Assuming you're talking about DST the concept and not DST the environment variable, then yes, you do need to take DST into account if using an NTP server. The server returns the time in UTC, which does not reflect DST. So UTC needs to be adjusted locally (on the Amiga) to account for DST.

Go to top


Re: NTP Server
Just popping in
Just popping in


@nbache

Quote:
For this particular problem I made the following solution:

Good idea. In my case, I turn my X1000 off when I'm not using it, so I end up booting frequently enough that drifting of the clock isn't an issue.

Go to top


Re: NTP Server
Just popping in
Just popping in


@rjd324

Quote:
The issue is that "Time" in my "Prefs" has no such tab named "Remote".

I'm using the standard OS 4.1 Time preferences editor. Sounds like you're using the Enhancer Time prefs editor, so it's not going to work exactly the same.

Quote:
You would think that the GUI would be enough. But, having read that thread, it seems that this is merely a way to save the server address. From there, you then have to use "Date SERVER PREFS" ? To pull down the latest time?

That's correct. You can do a one-time read of the remote time using the GUI (I assume the Enhancer version can do that, too). But to synchronize every time you boot you need to add the Date command to Network-Startup.

Quote:
But, in Prefs/Time when I click the "Automatically adjust clock for Daylight Saving Time" it reports the 28th November which is not consistent with what LOCALE reports.

Standard OS 4.1 also has a Timezone preferences editor, which is where you tell it to automatically adjust for daylight savings time. Perhaps Enhancer does away with that, and puts that functionality into the Time preferences editor. I can't help you there, as I don't have Enhancer.

Quote:
No idea what is happening here.

I don't seem to have a "DST" variable, so that may be another Enhancer feature. Maybe someone who has Enhancer can provide some more help. If all else fails, try going back to the regular OS 4.1 preferences tools and see if that helps.

Go to top


Re: NTP Server
Just popping in
Just popping in


@rjd324

Here's what works for me.

First, make sure you've got the latest bug-fixed versions of the Date command, the Time preferences editor, and timesync.library from AmiUpdate.

Make sure your Timezone and Locale preferences are set correctly, since that's where the offset from UTC to your local time is obtained.

Now run the Time preferences editor, and select the 'Remote' tab. Enter the URL of an NTP time server. I'm in the US, so I use "us.pool.ntp.org". You probably want to use something closer to you, but this server can be used for testing as a known-good server. Tick the 'Default' box to use the default port. Set the UTC offset to 'Auto'; the Hours and Minutes boxes should show the correct UTC offset for your location and time of year.

Click the 'Get Time' button. If all goes well, you should see the time fetched from the server appear as the Remote Time. If not, a requester should pop up to give you some idea what went wrong.

If you get a remote time, you can click 'Save' to write it to the hardware clock (and to save the time server settings). You are now synchronized to UTC.

To synchronize every time you boot up, add these lines to the end of S:Network-Startup:

Date >NILSERVER PREFS
Setclock 
>NILSAVE

This tells the Date command to get the remote time using the same settings as the Time preferences editor, and then uses SetClock to write that time to the hardware clock. For debugging you can remove the ">NIL:" from the Date command, in which case Date will display error messages if something goes wrong.

Of course, the synchronization only happens when you boot, so if you run for long periods of time without rebooting then the time may drift some.

Go to top


Odyssey and Google Translate
Just popping in
Just popping in


I've been trying to follow the discussion on OS4Welt about using RX cards with the X1000, but no matter whether I use the provided links or enter the page's URL directly into translate.google.com, the page does not translate, and always appears in German. This seems to be the case for some other random non-english web pages I tested, too.

Is this another example of something that no longer works with Odyssey?

Go to top


Re: Introducing the Rear Window blog
Just popping in
Just popping in


@trixie

A very nicely written blog entry. I feel the same way about the value of writing Amiga programs versus some more popular platform. Better (or at least, more satisfying) to be a big fish in a small pond than a small fish in a big pond!

Go to top


Re: aiostreams new release
Just popping in
Just popping in


@walkero

I second the thanks for the tip about Invidious! I've played with it a bit, and it does seem to work fairly well with Odyssey (though their documentation pages seem to get into some weird mode where all the text is invisible- this happens a lot when trying to bring up the list of instances; the links are there if you hover the mouse over them, but you can't see the text).

I also had an issue with at least one video where the data stream was just a little slower than the playback rate, which caused the player to run out of data and start stuttering. I had to keep pausing the video now and again to let it buffer some more.

On the plus side, it's able to play protected videos, something I haven't been able to make work with Odyssey. And some instances will let you download the video, allowing you to use offline players that might be faster or more capable than the one built into Odyssey. Downloading runs at the same speed as playing though, so it takes close to 30 minutes to download a 30 minute video, for example.

Go to top


Re: flawfinder for AmigaOS 4
Just popping in
Just popping in


@LiveForIt

Quote:
well strlen() is not used to write strings into buffer ... memcpy is not meant for string operating in general, as the name suggest meant for copy memory.

True, it would be silly to use strlen() and then memcpy() when strcpy() would do the same thing more efficiently. But Flawfinder still considers strlen() a potential security flaw, so I was trying to give a simple example to demonstrate why. A little too simple, perhaps.

Quote:
Strncpy should be used instead, like sprintf is unsafe, while snprintf is safe.

Unfortunately, the standard C library does not have a good length-limited string copy. strncpy() sounds like it is, but if the source string is longer than the specified length then the destination string is not NUL-terminated. That keeps the destination buffer from overflowing, but results in an unterminated string, which rightly earns strncpy() a warning from Flawfinder.

Depending on how portable you want your code to be, there are non-standard alternatives such as strnlen() and strlcpy(). Both newlib and clib2 have these, but other C libraries may not.

Go to top


Re: flawfinder for AmigaOS 4
Just popping in
Just popping in


@LiveForIt

Quote:
No a none terminated string will most likely crash your computer, or make your code run extremely slowly, in the best case.. if program is not working, it just not likely it will be exploited.

That's true if the unterminated string comes from within the program, as the result of a programmer error. But Flawfinder is looking for problems that come from outside the program, such as data that's read over a network, or files that are downloaded from somewhere.

Web browsers, streaming audio and video players, and any kind of file viewer or editor that operates on files created by someone else are examples of vulnerable programs. In such cases the attacker can try to exploit buffer overflows by creating a data file that's deliberately corrupted in a way that might trigger an overflow.

For example, if a particular file format dictates that a certain string stored in the file will never be longer than 'x' characters, then perhaps a program that's parsing that file will try to read the string into a buffer that's only 'x' characters long. If strlen()/memcpy() or strcpy() are used to read the string into the buffer, then a string that's longer than is legal may result in the buffer overflowing, as in your example.

To be safe, you need to make sure the length that is copied is clipped to the size of the buffer, something that strlen() and strcpy() don't do. That's what Flawfinder is pointing out-- it's reminding you to keep in mind how your program will respond to corrupted data.

If your program isn't operating on data from the outside world, then Flawfinder will likely not be of much use. Though I think it's worthwhile to keep buffer overflows in mind even when just reading files your program has written-- it's always possible for a file to accidentally get corrupted, and it's better for your program to safely reject such a file than to blow up when it tries to read it.

Go to top


Re: flawfinder for AmigaOS 4
Just popping in
Just popping in


From reading the documentation, Flawfinder seems to be mainly oriented toward finding security flaws in applications that are going to be under attack by someone trying to compromise them for malicious purposes. An unterminated string is just the sort of thing such an attacker might use, so Flawfinder is correct to report strlen() as a potential security flaw. Perhaps "SecurityFlawfinder" would be a better name.

I ran Flawfinder on one of my programs, and it complained a lot about strlen(), memcpy(), strncpy(), and the like, all things where buffer overflows are possible if misused. I always guard against such errors when writing a program, so the value of Flawfinder for me is minimal. It might be more helpful when using someone else's code, where the author(s) might not be as careful about such things as I am.

One annoyance I noticed: I tend to keep older versions of my programs in subdirectories of the project directory. Pointing Flawfinder at the project directory caused it to recurse into all the historical versions of the code as well as the current version, repeating the same warnings over and over for every different version. There doesn't seem to be an option to turn directory recursion off.

I don't know if Flawfinder is going to become one of my regular tools or not. But I appreciate walkero's work on bringing it to the Amiga-- better to have a tool and decide not to use it, than to not have it at all.

What we need is a good Lint for the Amiga. I look forward to Cppcheck, which appears to do at least some of what Lint does.

Go to top


Re: Introducing the Rear Window blog
Just popping in
Just popping in


@trixie

Quote:
I wonder what you'll say when you see the updated file requester that I'm getting ready for the upcoming version 1.2

Even more impressive! The code for the file requester has got to be half that of the entire program (not counting libraries and third-party stuff that you didn't have to write).

Looking forward to the next version!

Go to top


Re: Amigans.net 2022 updates
Just popping in
Just popping in


@Raziel

Quote:
Then again, can't makefiles be wrapped with "\" to make them more readable?

Yes they can, and I always do so with my own makefiles. But when you're porting something you probably want to change as little as possible, so you're stuck with however the original makefile was written.

Go to top



TopTop
« 1 2 3 4 (5) 6 7 8 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project