Forum > General

H2Pas can't handle EXP CALL from C header

(1/4) > >>

Dibo:
Hi,
Is there any special switch / param for H2Pas which can handle this declaration in C header:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---EXP ryzen_access CALL init_ryzenadj(); EXP void CALL cleanup_ryzenadj(ryzen_access ry); EXP enum ryzen_family get_cpu_family(ryzen_access ry);EXP int get_bios_if_ver(ryzen_access ry); EXP int CALL init_table(ryzen_access ry);EXP uint32_t CALL get_table_ver(ryzen_access ry);EXP size_t CALL get_table_size(ryzen_access ry);EXP float* CALL get_table_values(ryzen_access ry);EXP int CALL refresh_table(ryzen_access ry);
I'm getting this output with commented lines:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---(* error EXP ryzen_access CALL init_ryzenadj(); in declarator_list *)(* error EXP void CALL cleanup_ryzenadj(ryzen_access ry);in declaration at line 67 *)(* error EXP enum ryzen_family get_cpu_family(ryzen_access ry);in declaration at line 69 *)(* error EXP int get_bios_if_ver(ryzen_access ry);in declaration at line 70 *)(* error EXP int CALL init_table(ryzen_access ry);in declaration at line 72 *)(* error EXP uint32_t CALL get_table_ver(ryzen_access ry); in declarator_list *)
AFIK h2pas is quite old tool, I'm using the one from FPC installator. Is there anything updated or similar? I'm familiar with C lang and can convert it manually but there is a lot of methods

DragoRosso:
You can try CHET: https://github.com/neslib/Chet

I use it with several project in C and it gives good results.

It was write about Delphi, but I think that works also for Lazarus.

Dibo:
Thanks! I'm currently on linux machine and can't test it because I see it use some libclang.dll and other windows runtime library but I'll check this tomorrow on some window machine

Thaddy:

--- Quote from: DragoRosso on January 14, 2025, 10:24:02 pm ---You can try CHET: https://github.com/neslib/Chet

--- End quote ---
Promising!, Testing...Tnx.

Seenkao:
Посмотрите видео. Извиняюсь что на русском. Перематывайте видео вперёд (начало примерно на 3-й минуте), потому что делал видео на скорую руку.
По вашему коду, попробуйте убрать "EXP".

Google translate:
Watch video. Sorry it's in Russian. Fast forward the video (starts at about 3 minutes), because I made the video in a hurry.
According to your code, try removing "EXP".

Navigation

[0] Message Index

[#] Next page

Go to full version