/usr/share/codeblocks/lexers/lexer_prg.sample is in codeblocks-common 10.05-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #include "myinclude.h"
FUNCTION mydate
Return {15/08/2005} // Somehow the lexer doesnt recognize this date format - needs fix
ENDFUNC
FUNCTION ErrorHandler(X_Error,X_Program,X_Line,X_Cancel)
LOCAL X_ErrorMsg,X_CodeLineMsg
WAIT CLEAR
DO CASE
CASE X_Error==2005 .or. X_Error==1705
X_Resp=MessageBox("Can't use data file."+Chr(13)+;
"Program terminated.",0+16,"Error") // 5-Retry and cancel, 0 - Accept
* IF X_Resp==4 // Retry -> Gives error: Mismatched PushJmp/PopJmp call
* Retry
* ENDIF
OTHERWISE
X_ErrorMsg=Message()+Chr(13)+Chr(13)+;
"# Error: "+Ltrim(Str(X_Error))+Chr(13)+;
"Program: "+X_Program
X_CodeLineMsg=Message(1)
IF Between(X_Line,1,10000) And !X_CodeLineMsg="..."
X_ErrorMsg=X_ErrorMsg+Chr(13)+;
"Líne: "+Alltrim(Str(X_Line))
IF !Empty(X_CodeLineMsg)
X_ErrorMsg=X_ErrorMsg+Chr(13)+Chr(13)+X_CodeLineMsg
ENDIF
ENDIF
MessageBox(X_ErrorMsg,16,"Error") // OK/Icon=STOP SIGN/"Error"
ENDCASE
IF X_Cancel // Used before GoApp.Show
Finish()
Cancel
ENDIF
Return to Master
|