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

Added some mpg123 wrapped functions #762

Merged
merged 2 commits into from
May 5, 2023
Merged

Added some mpg123 wrapped functions #762

merged 2 commits into from
May 5, 2023

Conversation

ksco
Copy link
Collaborator

@ksco ksco commented May 5, 2023

Added for this game: https://cyfo.itch.io/katkoot, only mpg123_info is needed, by I added others anyway.

I used wrapperhelper, with this command under x86-64: ./helper /usr/include/mpg123.h libmpg123 x64 x64 --

It throws me a bunch of errors, and some mpg123 function wrappers are missing, don't know what's wrong.

--------------- Libclangtooling parse complete -----------------
input.cc:2:25: error: brackets are not allowed here; to declare an array, place the brackets after the name
    double[2][576] xr[2];
          ~~~~~~~~      ^
                        [2][576]
input.cc:3:25: error: brackets are not allowed here; to declare an array, place the brackets after the name
    double[2][22] sfb[2];
          ~~~~~~~       ^
                        [2][22]
input.cc:4:27: error: brackets are not allowed here; to declare an array, place the brackets after the name
    double[2][39] sfb_s[2];
          ~~~~~~~         ^
                          [2][39]
input.cc:5:18: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] qss[2];
       ~~~       ^
                 [2]
input.cc:6:25: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] big_values[2];
       ~~~              ^
                        [2]
input.cc:7:26: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2][3] sub_gain[2];
       ~~~~~~            ^
                         [2][3]
input.cc:8:29: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] scalefac_scale[2];
       ~~~                  ^
                            [2]
input.cc:9:22: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] preflag[2];
       ~~~           ^
                     [2]
input.cc:10:24: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] blocktype[2];
       ~~~             ^
                       [2]
input.cc:11:20: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] mixed[2];
       ~~~         ^
                   [2]
input.cc:12:23: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] mainbits[2];
       ~~~            ^
                      [2]
input.cc:13:21: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] sfbits[2];
       ~~~          ^
                    [2]
input.cc:2:25: error: brackets are not allowed here; to declare an array, place the brackets after the name
    double[2][576] xr[2];
          ~~~~~~~~      ^
                        [2][576]
input.cc:3:25: error: brackets are not allowed here; to declare an array, place the brackets after the name
    double[2][22] sfb[2];
          ~~~~~~~       ^
                        [2][22]
input.cc:4:27: error: brackets are not allowed here; to declare an array, place the brackets after the name
    double[2][39] sfb_s[2];
          ~~~~~~~         ^
                          [2][39]
input.cc:5:18: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] qss[2];
       ~~~       ^
                 [2]
input.cc:6:25: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] big_values[2];
       ~~~              ^
                        [2]
input.cc:7:26: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2][3] sub_gain[2];
       ~~~~~~            ^
                         [2][3]
input.cc:8:29: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] scalefac_scale[2];
       ~~~                  ^
                            [2]
input.cc:9:22: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] preflag[2];
       ~~~           ^
                     [2]
input.cc:10:24: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] blocktype[2];
       ~~~             ^
                       [2]
input.cc:11:20: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] mixed[2];
       ~~~         ^
                   [2]
input.cc:12:23: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] mainbits[2];
       ~~~            ^
                      [2]
input.cc:13:21: error: brackets are not allowed here; to declare an array, place the brackets after the name
    int[2] sfbits[2];
       ~~~          ^
                    [2]
--------------- Generator prepare complete -----------------
Unsupported Type: div_t
Unsupported Type: ldiv_t
Unsupported Type: lldiv_t
Unsupported Type: div_t
Unsupported Type: ldiv_t
Unsupported Type: lldiv_t
--------------- Generator gen complete -----------------

@ksco
Copy link
Collaborator Author

ksco commented May 5, 2023

Force-pushed, I forgot to commit those generated files.

@ksco ksco changed the title Added some mpg123 wrapped function Added some mpg123 wrapped functions May 5, 2023
@ptitSeb
Copy link
Owner

ptitSeb commented May 5, 2023

wrapperhelper is not working 100% correct. There are many cases were it generate function signature with a 'E' for no real reason. So use it carrefully.

@ptitSeb
Copy link
Owner

ptitSeb commented May 5, 2023

Because of the state of the wrapperhelper, I prefer not to document it for now. It's not in a good enough state.

@ptitSeb
Copy link
Owner

ptitSeb commented May 5, 2023

Or at least add a lot of warning as it's not really working and should not be use to directly generated box files.

@ksco
Copy link
Collaborator Author

ksco commented May 5, 2023

So use it carefully.

Yeah, I've double-checked all the committed ones.

I prefer not to document it for now.

It's useful as a reference, should I revert the README changes or add some warnings at the top?

@ptitSeb
Copy link
Owner

ptitSeb commented May 5, 2023

At least add some warning yes. I don't want to get PR with destroyed wrapping...

@ksco
Copy link
Collaborator Author

ksco commented May 5, 2023

Done.

@ptitSeb ptitSeb merged commit a9099ce into ptitSeb:main May 5, 2023
@ksco ksco deleted the w2 branch May 5, 2023 07:41
@ptitSeb
Copy link
Owner

ptitSeb commented May 5, 2023

On the subject of Wrapping. Not sure if you noticed but I introduced a RunFunctionFmt(...) a few days ago, and started converting callbacks of lib wrappings from RunFunction(...) to this. I did progress in alaphebitical order, and it's far from being done.
I think this might help RV64 (and other signed-extended platforms). The function use a string, with similar syntax to function wrapping (but without the return argument, and so also without the 'F') to describe the types of the args for the function call, instead of just a number and considering all args are u64.

@ksco
Copy link
Collaborator Author

ksco commented May 5, 2023

Oh, I didn't notice this one, sounds like a lot of work TBD. I'll check it out later and get involved for sure.

@ksco
Copy link
Collaborator Author

ksco commented May 6, 2023

I just took a look at the RunFunctionFmt function, it does help the sign extension issue. What should be done is to replace all RunFunctions with this new function, right?

@ptitSeb
Copy link
Owner

ptitSeb commented May 6, 2023

Yes, in all wrappedXXXX.c files. I started, but just did like... 10% or 20%, no more than that.

@ksco
Copy link
Collaborator Author

ksco commented May 6, 2023

I think I can convert them all today.

@ptitSeb
Copy link
Owner

ptitSeb commented May 6, 2023

All? Well, that's a lot of work. Some files, like pulse or x11, have a lot of them!

@ksco
Copy link
Collaborator Author

ksco commented May 6, 2023

About 600, I think it's doable ;)

@ptitSeb
Copy link
Owner

ptitSeb commented May 6, 2023

:O well, good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants