c/c++ hrc

View: New views
4 Messages — Rating Filter:   Alert me  

c/c++ hrc

by Alex Yaroslavsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello, All!

Some stuff at the c/c++ hrc's needs to be updated:

1. All the new x64 types: DWORD_PTR, intptr_t, etc...

2. In GCC the suffix for `i64' and `ui64' is `ll' and `ull'
   respectively, so they need to be added to the Number scheme at
   lib/default.hrc

P.S. What about an x64 version of colorer for the new x64 Far?
I might try to compile myself when I have some free time for this.

--
Bye,
    Alex.



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
colorer-talks mailing list
colorer-talks@...
https://lists.sourceforge.net/lists/listinfo/colorer-talks

Re: c/c++ hrc

by Igor Russkih :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Alex,

Hello, All!

Some stuff at the c/c++ hrc's needs to be updated:

1. All the new x64 types: DWORD_PTR, intptr_t, etc...

2. In GCC the suffix for `i64' and `ui64' is `ll' and `ull'
   respectively, so they need to be added to the Number scheme at
   lib/default.hrc

Thanks, I'll take care on this soon,

P.S. What about an x64 version of colorer for the new x64 Far?
I might try to compile myself when I have some free time for this.

That would be really cool. I've  only compiled it on amd64/linux - seems it works fine, please let me know if any problems will arise.

Thanks.

--
  Igor
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
colorer-talks mailing list
colorer-talks@...
https://lists.sourceforge.net/lists/listinfo/colorer-talks

Re[2]: c/c++ hrc

by Alex Yaroslavsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello, Igor!

IR> Hello, All!
>>
>> Some stuff at the c/c++ hrc's needs to be updated:
>>
>> 1. All the new x64 types: DWORD_PTR, intptr_t, etc...
>>
>> 2. In GCC the suffix for `i64' and `ui64' is `ll' and `ull'
>>    respectively, so they need to be added to the Number scheme at
>>    lib/default.hrc
IR> Thanks, I'll take care on this soon,
Another thing: items like FSF.sprintf, FSF.atoi get highlighted
after the dot - I don't think that standard function names should be
highlighted in such cases.

And something happened to makefile highlighting - VC (nmake) makefile
commands get all highlighted as errors.

>> P.S. What about an x64 version of colorer for the new x64 Far?
>> I might try to compile myself when I have some free time for this.
IR> That would be really cool. I've  only compiled it on amd64/linux - seems it
IR> works fine, please let me know if any problems will arise.
Compiles and works OK. The only changes in pcolorer code that are needed:

FarEditorSet.cpp - lines 248 and 252 (change DWORD to DWORD_PTR)

      { DI_EDIT,10,10,40,5,FALSE,(DWORD_PTR)"catalog",DIF_HISTORY,0,""},
      { DI_TEXT,6,11,0,0,FALSE,0,0,0,""},    // hrd
      { DI_BUTTON,12,12,0,0,FALSE,0,0,0,""}, // hrd button
      { DI_TEXT,6,13,0,0,FALSE,0,0,0,""},
      { DI_EDIT,10,14,25,5,FALSE,(DWORD_PTR)"clr_time",DIF_HISTORY,0,""},

pcolorer.cpp - line 58 (change int to INT_PTR)

HANDLE WINAPI OpenPlugin(int OpenFrom, INT_PTR Item)

and of course you need to use the new Far headers available from the
forum. There were also a few warnings from non pcolorer code but if you
say it works on linux then it is probably ok.

A binary of colorer.dll for Far x64 can be seen here
http://forum.farmanager.com/viewtopic.php?p=17390#17390

--
Bye,
    Alex.



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
colorer-talks mailing list
colorer-talks@...
https://lists.sourceforge.net/lists/listinfo/colorer-talks

Re: Re[2]: c/c++ hrc

by Igor Russkih :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alex, could you please validate the following changes, (according to you comments below):


Index: lib/default.hrc
===================================================================
--- lib/default.hrc    (revision 837)
+++ lib/default.hrc    (working copy)
@@ -116,7 +116,7 @@
     </scheme>
 
     <scheme name="CHexNumber">
-      <regexp match="/\b 0[xX][\da-fA-F]+ (?{NumberSuffix}[UuLl]{1,2}|(i64)|(i128))? \b/x" region="NumberHex"/>
+      <regexp match="/\b 0x[\da-fA-F]+ (?{NumberSuffix}u?l{1,2}|(i64)|(i128))? \b/ix" region="NumberHex"/>
     </scheme>
 
     <scheme name="FloatNumber">
@@ -126,7 +126,7 @@
     </scheme>
 
     <scheme name="DecNumber">
-      <regexp match="/\b\d+ ([UuLl]{1,2}|i64|i128)?\b/x" region0="NumberDec" region1="NumberSuffix"/>
+      <regexp match="/\b\d+ (u?l{1,2}|i64|i128)?\b/ix" region0="NumberDec" region1="NumberSuffix"/>
     </scheme>
 
     <scheme name="Number">
Index: base/c.hrc
===================================================================
--- base/c.hrc    (revision 837)
+++ base/c.hrc    (working copy)
@@ -660,6 +660,7 @@
      <word name="NULL" region="KeywordConstant"/>
      <word name="EOF" region="KeywordConstant"/>
 
+     <word name="intptr_t"/>
      <word name="size_t"/>
      <word name="ptrdiff_t"/>
      <word name="wint_t"/>
@@ -677,7 +678,7 @@
  </scheme>
 
  <scheme name="Keyword-Stdlibs" if="ansi-defines">
-        <keywords region="KeywordStdio">
+        <keywords region="KeywordStdio" worddiv="[^\d\w\.]">
             <word name='isalnum'/>
             <word name='isalpha'/>
             <word name='iscntrl'/>
@@ -4646,6 +4647,7 @@
      <word name='CTRYID'/>
      <word name='DLGPROC'/>
      <word name='DWORD'/>
+     <word name='DWORD_PTR'/>
      <word name='DWORDLONG'/>
      <word name='EDITWORDBREAKPROC'/>
      <word name='ENHMFENUMPROC'/>



On 12/5/06, Alex Yaroslavsky <trexinc@...> wrote:
Hello, Igor!

IR> Hello, All!
>>
>> Some stuff at the c/c++ hrc's needs to be updated:
>>
>> 1. All the new x64 types: DWORD_PTR, intptr_t, etc...
>>
>> 2. In GCC the suffix for `i64' and `ui64' is `ll' and `ull'
>>    respectively, so they need to be added to the Number scheme at
>>    lib/default.hrc
IR> Thanks, I'll take care on this soon,
Another thing: items like FSF.sprintf, FSF.atoi get highlighted
after the dot - I don't think that standard function names should be
highlighted in such cases.

And something happened to makefile highlighting - VC (nmake) makefile
commands get all highlighted as errors.

>> P.S. What about an x64 version of colorer for the new x64 Far?
>> I might try to compile myself when I have some free time for this.
IR> That would be really cool. I've  only compiled it on amd64/linux - seems it
IR> works fine, please let me know if any problems will arise.
Compiles and works OK. The only changes in pcolorer code that are needed:

FarEditorSet.cpp - lines 248 and 252 (change DWORD to DWORD_PTR)

      { DI_EDIT,10,10,40,5,FALSE,(DWORD_PTR)"catalog",DIF_HISTORY,0,""},
      { DI_TEXT,6,11,0,0,FALSE,0,0,0,""},    // hrd
      { DI_BUTTON,12,12,0,0,FALSE,0,0,0,""}, // hrd button
      { DI_TEXT,6,13,0,0,FALSE,0,0,0,""},
      { DI_EDIT,10,14,25,5,FALSE,(DWORD_PTR)"clr_time",DIF_HISTORY,0,""},

pcolorer.cpp - line 58 (change int to INT_PTR)

HANDLE WINAPI OpenPlugin(int OpenFrom, INT_PTR Item)

and of course you need to use the new Far headers available from the
forum. There were also a few warnings from non pcolorer code but if you
say it works on linux then it is probably ok.

A binary of colorer.dll for Far x64 can be seen here
http://forum.farmanager.com/viewtopic.php?p=17390#17390

--
Bye,
    Alex.




--
  Igor
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
colorer-talks mailing list
colorer-talks@...
https://lists.sourceforge.net/lists/listinfo/colorer-talks
LightInTheBox - Buy quality products at wholesale price