News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Recent posts

#71
Work in progress / Re: win32-doc md files
Last post by TimoVJL - November 06, 2025, 07:06:38 PM
Many times is good to keep line numbers intact.

Have miniz still problems with Pelles C 13 ?

Like in this:
https://github.com/kuba--/zip

EDIT: it have :(
#72
Work in progress / Re: win32-doc md files
Last post by John Z - November 06, 2025, 04:18:08 PM
Yes about what I did but a bit differently-
I added     #ifdef _PELLESC__
        #define MD_ASSERT(cond)     do {} while(0)
        #define MD_UNREACHABLE()    do {} while(0)
    #elif
at the beginning of the block there.

Flags are set to accommodate the GitHub idiosyncrasies, but
will probably work ok for any .md file.  Use the 'Convert other .md File'
button.

Here is a quick update of the program
Fixed needing the TOP button so that is now removed.

Added ability to list every name in the DB by entering an *
Hoping this makes it easier to find something -

John Z

Still need to modernize the ZIP code before posting sources.
#73
Work in progress / Re: win32-doc md files
Last post by TimoVJL - November 06, 2025, 01:03:09 PM
An interesting project.

To compile md4c.c, a change for it at line 100:47, && !__POCC__
    #elif defined _MSC_VER  &&  _MSC_VER > 120 && !__POCC__
#74
Work in progress / Re: win32-doc md files
Last post by John Z - November 06, 2025, 12:07:12 PM
The next improvement to the mdfiles program -

This adds the ability to show the .md file as .html in the browser.
Also creates a temp subdirectory under the program directory for the
files created so that it is easy to delete ones no longer wanted.  All
.md files and .html file will go into the temp directory.

The .md to .html file is using MIT License and Copyright © 2016-2024 Martin Mitáš
(http://github.com/mity/md4c) with my mods to make it work in Pelles C.

The .html file will use the systems default program to handle .html extension files.
Was going to use Timo's webview - but maybe later.

The upload only includes the .exe and a readme so use the db files from the prior post.

Input welcome and wanted.

John Z
#75
Tips & tricks / Railgun_Doublet
Last post by TimoVJL - November 04, 2025, 12:55:43 PM
http://www.sanmayce.com/Railgun/index.html

An interesting function to replace strstr for special cases.
#include <stdlib.h>
#include <stdint.h>
// All Railgun variants are written by Georgi 'Kaze', they are free, however I expect the user to mention its homepage, that is: http://www.sanmayce.com/Railgun/index.html
// Author's email: sanmayce@sanmayce.com
// Caution: For better speed the case 'if (cbPattern==1)' was removed, so Pattern must be longer than 1 char.
char * Railgun_Doublet (char * pbTarget, char * pbPattern, uint32_t cbTarget, uint32_t cbPattern)
{
    char * pbTargetMax = pbTarget + cbTarget;
    register uint32_t ulHashPattern;
    uint32_t ulHashTarget, count, countSTATIC;

    if (cbPattern > cbTarget) return(NULL);

    countSTATIC = cbPattern-2;

    pbTarget = pbTarget+cbPattern;
    ulHashPattern = (*(uint16_t *)(pbPattern));

    for ( ;; ) {
        if ( ulHashPattern == (*(uint16_t *)(pbTarget-cbPattern)) ) {
            count = countSTATIC;
            while ( count && *(char *)(pbPattern+2+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+2+(countSTATIC-count)) ) {
                count--;
            }
            if ( count == 0 ) return((pbTarget-cbPattern));
        }
        pbTarget++;
        if (pbTarget > pbTargetMax) return(NULL);
    }
}
#77
General discussions / Re: Where can I find the dialo...
Last post by jm - November 03, 2025, 09:52:43 PM
Many thanks Vortex, appreciate the welcome and the help.

Are there tutorials you're aware of, that might help me get further?  I have past experience in creating event-driven Windows forms with VB, VB.Net, Delphi and similar.  Thanks, Jim.
#78
General discussions / Re: Where can I find the dialo...
Last post by Vortex - November 03, 2025, 08:15:30 PM
Hi jm,

Welcome to the Forum.

Can you try this?

QuotePelles C IDE -> File -> New -> Resources -> right click untitled -> New -> Dialog
#79
General discussions / Where can I find the dialog ed...
Last post by jm - November 03, 2025, 08:02:54 PM
Greetings, I've installed the IDE, version 13.00.7, but cannot seem to find the dialog editor, example of which shown in the below.

http://smorgasbordet.com/pellesc/images/screen2.png

I can find limited reference to it in former posts, but nothing beyond that.

Would appreciate if anyone can point me in the right direction.  Thanks indeed, Jim.
#80
Beginner questions / Re: Createwindow
Last post by Vortex - November 03, 2025, 12:35:30 PM
Hi DonnyDave,

Good news. Don't hesitate if you have other questions. We can help you.