Pelles C > Feature requests

Suggestions, Many Suggestions

(1/8) > >>

CandCPlusPlus:
Suggestions. Many Suggestions. I decided to post this all into one single thread. Otherwise, it would clutter this section of the forum and I'll number them all so that people responding can mention it by number.

1. Giving macros called in the code and the macro itself a different color from other code and add it to the "Color and Fonts" section of the enviroment settings. The individual color for macros exists in Visual Studio and it's nice for being able tell what is and what isn't a macro. One could even give the code for structs a particular color as well?

2. Unicode/ASCII selection for Windows API and C in the project settings. Default to unicode for new projects since almost everything is unicode nowadays? I have to remember set the unicode statements for every project, especially Windows projects.

3. I need to add "#Define __STDC_WANT_LIB_EXT1__ 1" in order to use the secure functions. Should this be in project settings and enabled by default for new projects? I believe the Visual Studio compiler even blocks the insecure C functions by default.

Edit: This is by design apparently, this is a part of the C standards.

4. A setting in options to adjust default folder for saving new projects. I don't see a place to change it anywhere in the GUI but I could be missing it.

5. Pelles C defaulting to settings that allow debugging out of the box. I have to adjust the compiler settings to use debugging whenever I install Pelles C anywhere. Not a huge problem but it would be nice for it work out of the box. Though, there could be a reason that it's setup this way that I'm not aware of.

Edit: Whenever I create a new project I need to go to the "Compiler" page to change "Debug information" to "Full" and I need to go to the "Linker" page to change "Debug information" to "Pelles C format". This is all in the project settings. Otherwise, I will get a message about the lack of debug information.

6. The help content in Pelles C appears to mostly be content about the C Standard Library. The entire of documentation of the Windows API is now available from Microsoft on Github under the MIT license. It's in markdown format but imagine it could be converted to the Microsoft (CHM) HTML help. I'm not a lawyer but all it says to do is to credit Microsoft which is easy. I still do like offline documentation even in today's world. It's nice when your internet connection goes "poof" and it would be nice to have it built into the Pelles C UI and the installer.
https://github.com/MicrosoftDocs/win32

Edit: The Microsoft open source help content is a mess. Perhaps a tool to integrate the old style document explorer offline help content into the Pelles C instead? A link to what I've found so far:
https://forum.pellesc.de/index.php?topic=10589.msg36853

7. Related to documentation, it would be convenient if you could just press a keyboard shortcut and it would bring you straight to the built in help content of the particular C Standard Library or Windows API function that the cursor is at.

8. There are function call tips provided by Pelles C after you type the entire name of the function. These tips dissappear if you move the cursor to elsewhere and do not reappear when I later go back to change or complete the function call code. I wish the functions tips would reappear when the cursor or mouse is inside the function code.

9. Memory leak detector, GDI and USER object leak detector, likely a job fit for an add-in?

10. Breakpoints only work within function calls and variables from outside a function. It would be good to be able set breakpoints in code contained entirely within a single function (well, at least, I haven't been able to do so without errors). I imagine that it could be a huge undertaking to enhance the debugger though.


It's says a lot that after using Pelles C for a little while, I'm finding it really hard to think of any more features or suggestions beyond this and some of these are rather minor. The debugger improvements are likely to be the biggest undertaking, to the point that it may not be viable but that's my guess. :)

CandCPlusPlus:
11. I thought of a major suggestion. ARM64 support. An ARM64 build of Pelles C? Possibly even support for compiling for ARM64 on Intel/AMD x64 CPUs (and x64 Pelles C)? Microsoft is really increasing their support of ARM64.

12.  Add comment and uncomment code buttons to the toolbar. I'm quite used to this in Visual Studio. I discovered that you can right click in Pelles C to get a context menu with comment and uncomment button but it would be more convenient to have it in the toolbar.

13. An autocomplete for Windows API functions, the C Standard Library and perhaps even functions in a project's code. Autocomplete could, at least, in theory, be easier to implement in C with "mere" functions and structures. I have noticed that Pelles C already has autocomplete for structs.

14. A way to add and modify the properties for a file to be compiled. Windows shows the file version, properties and everything for many files when you click properties and than details. It's useful for tracking which version an executable is when on one of my computers. It's all blank for files compiled with Pelles C.

15.  Buffer overflow detection and warnings when trying to compile or execute.

Edit: This partially exists when warning level 2 is selected in Pelles C. Stack overflows are detected for stack allocated arrays but *not* for heap allocated arrays or memory.

16. A replace all in selection only option in the Replace dialog.

17. Compiler warnings for assignments in if statements, accidentally using "=" instead of "==". Add possible option in settings for how to handle this?

18. Putting Pelles C on the Microsoft Store?

19. An option for Control Flow Guard (and other Windows security features) ?

John Z:
Hi CandCPlusPlus,

Welcome to the forum!



--- Quote from: CandCPlusPlus on August 09, 2022, 05:46:58 PM ---Suggestions. Many Suggestions. I decided to post this all into one single thread. Otherwise, it would clutter this section of the forum and I'll number them all so that people responding can mention it by number.
--- End quote ---

Well - pros and cons in doing it this way.  Yes less entries but harder to track all inputs on a particular item, also people interested in only one or two will need to wade through it all....  IMO


--- Quote from: CandCPlusPlus on August 09, 2022, 05:46:58 PM ---4. A setting in options to adjust default folder for saving new projects. I don't see a place to change it anywhere in the GUI but I could be missing it.
--- End quote ---
When you create a new project you have the option of putting it anywhere you want by changing the path in the Location dialog edit box at the bottom of the New Project window.


--- Quote from: CandCPlusPlus on August 09, 2022, 05:46:58 PM ---5. Pelles C defaulting to settings that allow debugging out of the box. I have to adjust the compiler settings to use debugging whenever I install Pelles C anywhere. Not a huge problem but it would be nice for it work out of the box. Though, there could be a reason that it's setup this way that I'm not aware of.
--- End quote ---
Not sure what this means - is it different from using Project Modes?


--- Quote from: CandCPlusPlus on August 09, 2022, 05:46:58 PM ---7. Related to documentation, it would be convenient if you could just press a keyboard shortcut and it would bring you straight to the built in help content of the particular C Standard Library or Windows API function that the cursor is at.
--- End quote ---

At least for part of this try using F1 on any highlighted key word to open the help for that function, and the include file it is in.

John Z

TimoVJL:
The poide have an Add-In interface and it can handle additional F1 usage.
In Add-Ins section are many examples of additional help searchings for WSDK.

One example for testing:
--- Code: ---#define WIN32_LEAN_AND_MEAN
#define UNICODE /* for Windows API */
#define _UNICODE    /* for C runtime */
#include <windows.h>
//#include <windowsx.h>
#include <htmlhelp.h>
#include <tchar.h>
#include <addin.h>

#pragma comment(lib, "htmlhelp.lib")

// Locals.
static HANDLE g_hmod = NULL;
static TCHAR szHelp[MAX_PATH];

BOOL WINAPI DllMain(HANDLE hDLL, DWORD dwReason, LPVOID lpReserved)
{
    switch (dwReason)
    {
        case DLL_PROCESS_ATTACH:
            g_hmod = hDLL;
            return TRUE;

        case DLL_PROCESS_DETACH:
            return TRUE;

        default:
            return TRUE;
    }
}

ADDINAPI BOOL WINAPI AddInMain(HWND hwnd, ADDIN_EVENT eEvent)
{
    switch (eEvent)
    {
        case AIE_APP_CREATE:
AddIn_GetIDEFolder(hwnd, ADDIN_FOLDER_HELP, szHelp, sizeof(szHelp));
lstrcat(szHelp, TEXT("\\AddIn.chm"));
            return TRUE;

        case AIE_APP_DESTROY:
            return TRUE;

        default:
            return TRUE;
    }
}

BOOL HelpSearch(HWND hwnd, TCHAR *wcKey);

ADDINAPI BOOL WINAPI AddInHelp(HWND hwnd, ADDIN_HELPEVENT eEvent, LPCVOID pcvData)
{
if (eEvent == AIHE_SRC_KEYWORD_FIRST)
return FALSE;
return HelpSearch(hwnd, (TCHAR*)pcvData);
}

BOOL HelpSearch(HWND hwnd, TCHAR *szKey)
{
TCHAR szTmp[512];
HH_AKLINK aklnk = {0};
aklnk.cbStruct = sizeof(HH_AKLINK);
aklnk.pszKeywords = szKey;
//aklnk.fIndexOnFail = TRUE;
wsprintf(szTmp, TEXT("%s macro;%s function;%s structure"), szKey, szKey, szKey);
aklnk.pszKeywords = szTmp;
if (HtmlHelp(hwnd, szHelp, HH_KEYWORD_LOOKUP, (UINT_PTR)&aklnk) != NULL) {
return TRUE;
}
return FALSE;
}

--- End code ---

CandCPlusPlus:

--- Quote ---Well - pros and cons in doing it this way.  Yes less entries but harder to track all inputs on a particular item, also people interested in only one or two will need to wade through it all....  IMO
--- End quote ---

True. I had not thought of the cons of putting it all into one thread. I may create a second or even third thread if one of the suggestions gets lots of replies. :)


--- Quote ---Not sure what this means - is it different from using Project Modes?
--- End quote ---

Whenever I create a new project I need to go to the "Compiler" page to change "Debug information" to "Full" and I need to go to the "Linker" page to change "Debug information" to "Pelles C format". This is all in the project settings. Otherwise, I will get a message about the lack of debug information.

Navigation

[0] Message Index

[#] Next page

Go to full version