Search found 1918 matches

by srvaldez
Jun 26, 2019 20:46
Forum: General
Topic: mingw_stdio example
Replies: 12
Views: 251

Re: mingw_stdio example

@SARG
thanks a million for your fine detective work :-)
a take it that if the return type were one of FB's built-in types it would work.
by srvaldez
Jun 26, 2019 9:58
Forum: General
Topic: mingw_stdio example
Replies: 12
Views: 251

Re: mingw_stdio example

my question is, why does the following example work in 64-bit but not in 32-bit? #Include "crt/longdouble.bi" Extern "c" Declare Sub __mingw_sprintf (Byval s As Zstring Ptr,Byval frmt As Zstring Ptr,Byval c As clongdouble) Declare Sub __mingw_sscanf (Byval s As Zstring Ptr,Byval ...
by srvaldez
Jun 25, 2019 21:52
Forum: General
Topic: mingw_stdio example
Replies: 12
Views: 251

Re: mingw_stdio example

hello SARG your declarations are very similar to my next to last post, tested ok both 32 and 64 bit sadly, the same approach won't work for functions like sinl, it works ok in 64-bit but not in 32-bit, apparently, there are some differences between linux cdecl and windows cdecl, or perhaps FB is gen...
by srvaldez
Jun 25, 2019 16:46
Forum: General
Topic: mingw_stdio example
Replies: 12
Views: 251

Re: mingw_stdio example

having discovered how the clongdouble variable is to be passed to sscanf and sprintf, there's much simplification, a naked sub with a simple jump, I like the simplicity of it. #include "crt/longdouble.bi" Sub sprint_ Naked Cdecl(Byval buf As Zstring Ptr, Byval frmt As Zstring Ptr, Byval x ...
by srvaldez
Jun 25, 2019 14:47
Forum: General
Topic: mingw_stdio example
Replies: 12
Views: 251

Re: mingw_stdio example

yes, you are right, here's the version without the asm note that in the function sscanf x must (obviously) be passed byref whereas in sprintf it must be passed byval. #include "crt/longdouble.bi" extern "c" declare function __mingw_sscanf(byval as zstring ptr, byval as zstring pt...
by srvaldez
Jun 25, 2019 14:19
Forum: General
Topic: mingw_stdio example
Replies: 12
Views: 251

Re: mingw_stdio example

hello caseih
I don't see how you could call these functions from FB other than asm or a C wrapper library, do you have any ideas?
by srvaldez
Jun 25, 2019 13:22
Forum: General
Topic: mingw_stdio example
Replies: 12
Views: 251

mingw_stdio example

Windows CRT sscanf and sprintf don't support 80-bit reals but mingw does, here's an example #ifdef __FB_WIN32__ #ifdef __FB_64BIT__ '64-bit Type ext_real As Ulongint hi, lo end type Sub sprint_ Naked Cdecl(Byval buf As Zstring Ptr, Byval frmt As Zstring Ptr, Byref x As ext_real) Asm Sub rsp, 56 fld ...
by srvaldez
Jun 21, 2019 16:55
Forum: Community Discussion
Topic: fb 1.07 tests
Replies: 12
Views: 537

Re: fb 1.07 tests

Are there any plans already whether or on which platforms to make ENABLE_STRIPALL=1 default? https://www.freebasic.net/forum/viewtopic.php?p=261458#p261458 wiki is most up to date docs for current development version: see Compiler Option: -strip see Compiler Option: -nostrip Correct, "--strip-...
by srvaldez
Jun 21, 2019 16:27
Forum: General
Topic: Squares
Replies: 6658
Views: 377025

Re: Squares

by srvaldez
Jun 21, 2019 13:02
Forum: General
Topic: Squares
Replies: 6658
Views: 377025

Re: Squares

ahh, ice-cold beer :-)
by srvaldez
Jun 21, 2019 12:59
Forum: Community Discussion
Topic: Pulsar2D
Replies: 6
Views: 204

Re: Pulsar2D

your main OS is Windows right? are you using the standalone FreeBasic or the mingw-tools integrated version? either way, there are 17 dll's in the win32 bin distribution, too many dependencies for my taste. but for a quick and dirty test, copy the *.bi files to Pulsar2D-Distribution\Examples\BASIC c...
by srvaldez
Jun 20, 2019 15:54
Forum: General
Topic: smart code formatter
Replies: 7
Views: 214

Re: smart code formatter

@RockTheSchock
thank you
by srvaldez
Jun 20, 2019 11:35
Forum: General
Topic: smart code formatter
Replies: 7
Views: 214

Re: smart code formatter

@jj2007
I don't want to post code here, no need to give people a headache, thanks for the offer though, in the meantime, several iterations of search&replace does the job.
offtopic, I found that it's easy to call the mingw sscanf and sprintf to input/output 80-bit reals.
by srvaldez
Jun 19, 2019 20:08
Forum: General
Topic: smart code formatter
Replies: 7
Views: 214

Re: smart code formatter

there are about 2100 lines of code including spacers between functions/subs, it's a mix of FB code and inline asm.
by srvaldez
Jun 19, 2019 19:00
Forum: General
Topic: smart code formatter
Replies: 7
Views: 214

smart code formatter

somehow, after editing a file on different OS's, I wound up with mixed spaces and tabs, does anyone know of a smart code reformatter that will replace spaces with tabs? note that in some areas there are 3 spaces and at others 4 or 5 spaces. I tried search and replace, but it will take me forever to ...

Go to advanced search