News:

Download Pelles C here: http://www.pellesc.se

Main Menu

Recent posts

#11
User contributions / Re: Has anyone built a crude ...
Last post by rweidner - March 11, 2026, 08:48:08 PM
That's an interesting project idea, actually. If the scope of the project was limited to source code and ignored binary assets (images, sound, etc.), you could in theory use sqlite (or any db that supports triggers)

A CRUDE but effective workflow might be.

- scan source code directories for code files (for example, .c or .h)
- check file timestamps
- find the file in the database
- If file times on the file system differ from the one stored in the database, change the content in the database.
- If it doesn't exist at all, insert it. (filepath, file timestamp, content)
- use a "BEFORE" trigger to copy the current row into a history table. The history table will look like the code table plus a new primary key.

I mean, that's no GIT replacement, but it would track changes.

Is that what you meant by "crude"? Or did you need something more?

I think with just a little more work, one could add revisions.
#12
User contributions / Re: Has anyone built a crude ...
Last post by ddainelis1 - March 11, 2026, 12:42:07 PM
Thank you for the lead.
#13
User contributions / Re: Has anyone built a crude ...
Last post by Vortex - March 11, 2026, 11:08:25 AM
Hello,

You can check this one :

QuoteA simple CRUD system written in C

https://github.com/gabrielwitor/CRUD-C
#14
User contributions / Has anyone built a crude CMS ...
Last post by ddainelis1 - March 11, 2026, 02:51:43 AM
Has anyone built a crude CMS ( Code Management System) in Pelles C.    I'm working on a Dartmouth style BASIC interpreter since my old ALTAIR 8080 died.  I really do not want to spend the time to fully understand GITHIB right now.   Just wondering.
#15
Add-ins / Batch Builder
Last post by John Z - March 11, 2026, 01:08:02 AM
This is an Add-In BBBuilder.dll version 1

The BBBBuilder.dll will create a single .bat file that when run from the command line will build the program that was open at the time BBBBuilder was invoked.  It is all in one.  Run the resulting .bat file and it will build the program.

The dll does all of the work, the output is the 'project name'.bat.  Of course it can be edited manually too.

Limitations:
1) no spaces in the source filenames
2) no spaces in subdirectory names under the project directory
3) file names are not to be Unicode, or if Unicode then only using ASCII characters

Source code will be released once I get the PowerShell script working, or I give up on that option. Currently PowerShell works for everything but linking.

John Z

Tested program with 45 C files, several subdirs, and some prebuilt .objs
Tested a console program
Tested an asm file
Tested building a batch file to build the dll itself.

More information in the readme.txt included in the zip file. Example .bat attached too
#16
Graphics programming / Re: raylib 5.5 + PellesC v13.0...
Last post by Vortex - March 10, 2026, 10:00:16 PM
Hi rweidner,

ChatGPT's example code using raygui :

#include "raylib.h"

#define RAYGUI_IMPLEMENTATION
#include "raygui.h"

int main(void)
{
    InitWindow(640, 200, "raygui textbox");

    char text[128] = "Edit me";
    bool editMode = false;

    SetTargetFPS(60);

    while (!WindowShouldClose())
    {
        Rectangle rect = {100, 80, 200, 30};

        BeginDrawing();
        ClearBackground(RAYWHITE);

        if (GuiTextBox(rect, text, 128, editMode))
            editMode = !editMode;

        EndDrawing();
    }

    CloseWindow();
}

https://github.com/raysan5/raygui
#17
Bug reports / Re: bug report. setvbuf() func...
Last post by John Z - March 10, 2026, 09:20:06 PM
The issue seems limited to the predefined streams.
 Checked using stderr  and the same issue exists.

Checked using a 'true' File *p_file stream and could not get it to fail.  I also use setvbuf  extensively in many places in other programs without issue so this makes sense.

To see if it is a 'speed' issue putting a delay loop between printf / fprintf steps might check that.  For the most part the dropouts appear mostly in the same location, with minor variations which might be due to other activity on the system.

To be continued -

John Z

Update:  Delay loop makes no difference. 
for (loup = 0; loup < 8000000; loup++) // 8K to 8000k tested
           {a = -a;}

Dropout (for want of a better word) is very consistent test after test happens in about the same location.
#18
Assembly discussions / Re: raylib sample
Last post by Vortex - March 10, 2026, 08:41:03 PM
Here is the 64-bit version :

include    raylibDemo.inc

.data

msg1        db 'raylib hello',0
msg2        db 'Hello, raylib!',0

.code

start:

    sub    rsp,8+4*8
    call    main
    invoke  ExitProcess,0

main PROC PARMAREA=5*SIZEOF QWORD

    invoke  InitWindow,800,450,ADDR msg1
    invoke  SetTargetFPS,60
@@:
    invoke  WindowShouldClose
    test    rax,rax
    jnz    @f

    invoke  BeginDrawing
    invoke  ClearBackground,RAYWHITE
    invoke  DrawText,ADDR msg2,190,200,40,BLACK
    invoke  EndDrawing
    jmp    @b
@@:
    invoke  CloseWindow
    ret

main ENDP

END start
#19
Assembly discussions / raylib sample
Last post by Vortex - March 10, 2026, 08:11:29 PM
Hello,

Inspired by the thread :

https://forum.pellesc.de/index.php?topic=11730.0

Extra files required to build and run the executable :

raylibdll.lib
raylib.dll

include     raylibDemo.inc

.data

msg1        db 'raylib hello',0
msg2        db 'Hello, raylib!',0

.code

start:

    invoke  InitWindow,800,450,ADDR msg1
    invoke  SetTargetFPS,60
@@:
    invoke  WindowShouldClose
    test    eax,eax
    jnz     @f

    invoke  BeginDrawing
    invoke  ClearBackground,RAYWHITE
    invoke  DrawText,ADDR msg2,190,200,40,BLACK
    invoke  EndDrawing
    jmp     @b
@@:
    invoke  CloseWindow

    invoke  ExitProcess,0

END start
#20
Bug reports / Re: bug report. setvbuf() func...
Last post by TimoVJL - March 10, 2026, 12:24:39 PM
#include <stdio.h>

int main(void)
{
    int size = 0;
    if (setvbuf(stdout, NULL, _IOFBF, 5000))
        fprintf(stdout, "setvbuf error\n");
    else {
        for (int i = 0; i <= 309; i++)
            size += fprintf(stdout, "'%d'\n", i);
        fprintf(stdout, "size: %d\n", size);
    }
    return 0;
}
'307'
'08'
'309'
size: 1750