Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine common parts of FiosGet... #32

Closed
DorpsGek opened this issue Dec 20, 2005 · 4 comments
Closed

Combine common parts of FiosGet... #32

DorpsGek opened this issue Dec 20, 2005 · 4 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

egladil opened the ticket and wrote:

This patch takes the common parts of FiosGetSavegameList and FiosGetScenarioList, and replace them with FiosGetFileList which uses a callback to determine which files to add to the list. This removes the duplicated code, and also makes it easier to add new file formats to list. (Like the tutorials im working on.)
It needs testing on win32 and os2, since I don't have access to any of those.

Summary of changes:
* Moved arch independet fios functions to new file fios.c
* Added FiosGetFileList to os2.c, unix.c and win32.c
* Removed FiosGetSavegameList and FiosGetScenarioList from os2.c, unix.c and win32.c
* Created new FiosGetSavegameList and FiosGetScenarioList in fios.c
* Updated makefile and vc projects.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/32
@DorpsGek
Copy link
Member Author

egladil wrote:

Updated diff according to the comments peter1138 had. (No functional changes, just added doxygen comments.)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/32#comment49

@DorpsGek
Copy link
Member Author

DaleStan wrote:

Update diff to work in Win32 (VS 2003)

* Include fios.h in win32.c
* Moved MSVC strcasecmp definition from win32.c to StdAfx.h
* Removed an unreferenced local in win32.c

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/32#comment61

@DorpsGek
Copy link
Member Author

egladil wrote:

I updated the diff to use "typedef FiosItem *(FiosGetFileListCallback)(char *file, const char *filename, int mode);" for the callback function, instead of explicity specifying the type in all FiosGetFileList() functions.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/32#comment68

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 7, 2006

Darkvater closed the ticket.

Reason for closing: Implemented

Thank you egladil. I took parts of your patch and that of TrueLight, combined them, added some more and added it to SVN.


This comment was imported from FlySpray: https://bugs.openttd.org/task/32

@DorpsGek DorpsGek closed this as completed Aug 7, 2006
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant