├── APIs └── C (N64).xml ├── Config └── N64C.xml ├── N64C.dll ├── README.md ├── UDL └── N64C.xml └── sourcecode ├── legacylib ├── OldAccessor.h ├── OldFontQuality.h ├── OldKeyWords.cxx ├── OldKeyWords.h ├── OldPlatWin.cxx ├── OldPlatform.h ├── OldPlatformRes.h ├── OldPropSet.cxx ├── OldPropSet.h ├── OldPropSetSimple.h ├── OldSciLexer.h ├── OldScintilla.h ├── OldStyleContext.cxx ├── OldStyleContext.h ├── OldUniConversion.cxx ├── OldUniConversion.h ├── OldWindowAccessor.cxx ├── OldWindowAccessor.h ├── OldXPM.cxx └── OldXPM.h ├── src ├── Legacy.cpp ├── Legacy.h ├── N64C.cpp ├── N64C.h ├── N64C.rc ├── N64C_Plugin.def └── resource.h └── vcbuild ├── N64C.vs.2008.ncb ├── N64C.vs.2008.sln ├── N64C.vs.2008.suo ├── N64C.vs2008.ncb └── vcbuild.vcproj /Config/N64C.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | union inline register auto int char musConfig NUScPreNMIFunc musHandle unsigned signed short long float double void static const extern size_t f32 f64 vu8 vu16 vu32 vu64 vs8 vs16 vs32 vs64 u8 u16 u32 u64 s8 s16 s32 s64 volatile NUContData typedef struct Mtx OSTask OSMesg OSContStatus OSContPad OSIoMesg OSThread Vtx OSMesg OSMesgQueue OSTime enum OSPiHandle OSPri Gfx Vp Vtx_t Vtx_tn Vtx uSprite_t uSprite Tri Mtx_t Mtx Vp_t Vp Light_t Ambient_t Hilite_t Light Ambient Lightsn Lights0 Lights1 Lights2 Lights3 Lights4 Lights5 Lights6 Lights7 LookAt Hilite Gdma Gtri Gpopmtx Gsegment GsetothermodeL GsetothermodeH Gtexture Gline3D Gsetimg Gsetcombine Gsetcolor Gfillrect Gsettile Gloadtile Gloadblock Gloadtlut Gsettilesize Gtexrect TexRect Gwords ALSynConfig ALSeqpConfig ALSndpConfig NUScClient NUGfxFunc NUDMABuffer NUDMAState ALCSPlayer ALCSeq NUAuSeqPlayer ALSndId NUAuSndId NUScMsg NUScTask ALHeap ALBankFile ALSeqFile ALSndPlayer NUAuPreNMIFunc NUAuMgrFunc ALGlobals Acmd NUSched NUUcode NUIdleFunc NUGfxPreNMIFunc NUGfxSwapCfbFunc NUGfxTaskEndFunc NUContReadFunc NUContPakFunc NUContRmbFunc NUCallBackFunc NUPiOverlaySegment NUSiCommonMesg NUContReadMesg NUContQueryMesg NUContPakFile OSPfs NUContPakFreeMesg NUContPakFileOpenMesg NUContPakFileRWMesg OSPfsState NUContPakFileStateMesg NUContPakFileNumMesg NUContPakIsPlugMesg NUContRmbCtl NUContRmbMesg NUCallBackList NUEepromMesg NUContGBPakMesg OSVoiceHandle OSVoiceData NUVrsHandle NUVrsData NUVrsMesg NUDebTaskTime NUDebTaskPerf NUDebConWindow osTimer 10 | CONT_OVERRUN_ERROR CONT_TYPE_MASK CONT_TYPE_NORMAL CONT_ABSOLUTE CONT_RELATIVE CONT_JOYPORT CONT_TYPE_MOUSE CONT_TYPE_VOICE CONT_CARD_ON CONT_CARD_PULL PFS_ERR_NOPACK PFS_ERR_DEVICE PFS_ERR_CONTRFAIL MAXCONTROLLERS OS_EVENT_SW1 OS_EVENT_SW2 OS_EVENT_CART OS_EVENT_COUNTER OS_EVENT_SP OS_EVENT_AI OS_EVENT_VI OS_EVENT_PI OS_EVENT_PRENMI OS_EVENT_CPU_BREAK OS_EVENT_SP_BREAK OS_EVENT_FAULT OS_EVENT_THREADSTATUS PFS_ERR_NOPACK PFS_ERR_NEW_PACK PFS_ERR_CONTRFAIL PFS_ERR_ID_FATAL PFS_ERR_DEVICE OS_MESG_PRI_NORMAL OS_MESG_PRI_HIGH OS_READ OS_WRITE OS_OTHERS EEPROM_TYPE_4K EEPROM_TYPE_16K MUSFLAG_SONGS G_RM_XLU_SURF2 G_IM_SIZ_32b MUSFLAG_EFFECTS G_RM_ZB_XLU_SURF2 G_TT_RGBA16 A_BUTTON B_BUTTON START_BUTTON Z_TRIG L_TRIG R_TRIG U_CBUTTONS D_CBUTTONS L_CBUTTONS R_CBUTTONS U_JPAD D_JPAD L_JPAD R_JPAD NU_DEB_CON_TEXT_BLACK NU_DEB_CON_TEXT_BLUE NU_DEB_CON_TEXT_GREEN NU_DEB_CON_TEXT_CYAN NU_DEB_CON_TEXT_RED NU_DEB_CON_TEXT_MAGENTA NU_DEB_CON_TEXT_YELLOW NU_DEB_CON_TEXT_WHITE NU_DEB_CON_TEXT_LIGHTBLACK NU_DEB_CON_TEXT_LIGHTBLUE NU_DEB_CON_TEXT_LIGHTGREEN NU_DEB_CON_TEXT_LIGHTCYAN NU_DEB_CON_TEXT_LIGHTRED NU_DEB_CON_TEXT_LIGHTMAGENTA NU_DEB_CON_TEXT_LIGHTYELLOW NU_DEB_CON_TEXT_LIGHTWHITE NU_AU_CHANNELS NU_AU_SYN_UPDATE_MAX NU_AU_DMA_BUFFER_NUM NU_AU_DMA_BUFFER_SIZE NU_SC_MAX_MESGS NU_DEB_MARKER_NUM NU_DEB_PERF_GFXTASK_CNT NU_DEB_PERF_AUTASK_CNT NU_DEB_CON_TEXT_SIZE NU_AU_MGR_THREAD_PRI NU_AU_MGR_THREAD_ID NU_AU_CLIST_LEN NU_AU_OUTPUT_RATE NU_AU_MESG_MAX NU_AU_HEAP_SIZE NU_AU_HEAP_ADDR NU_AU_SONG_SIZE NU_AU_SAMPLE_SIZE NU_AU_SE_SIZE NU_AU_TASK_STOP NU_AU_TASK_RUN NU_AU_SEQ_PLAYER0 NU_AU_SEQ_PLAYER1 NU_AU_SEQPLAYER_NUM NU_AU_FIFO_LENGTH NU_SC_NOSWAPBUFFER G_RM_AA_ZB_TEX_EDGE2 OS_VI_GAMMA_OFF G_PM_1PRIMITIVE OS_VI_GAMMA_DITHER_OFF OS_VI_DIVOT_OFF OS_VI_DITHER_FILTER_OFF G_IM_SIZ_8b G_IM_SIZ_16b NU_DEB_CON_WINDOW0 NU_DEB_CON_WINDOW1 NU_DEB_CON_WINDOW2 NU_DEB_CON_WINDOW3 OS_PRIORITY_VIMGR G_SHADE G_SHADING_SMOOTH NU_SC_SWAPBUFFER G_RM_NOOP2 NU_GFX_UCODE_F3DEX G_CULL_BOTH G_FOG G_LIGHTING G_TEXTURE_GEN CONT_UP CONT_DOWN CONT_RIGHT CONT_LEFT CONT_A CONT_B CONT_C CONT_F CONT_D CONT_E CONT_L CONT_R CONT_G CONT_START G_CYC_FILL OS_MESG_NO_BLOCK OS_MESG_BLOCK OS_EVENT_SI OS_EVENT_DP OS_MESG_BLOCK CONT_NO_RESPONSE_ERROR G_TEXTURE_GEN_LINEAR G_LOD G_OFF G_ON G_CYC_1CYCLE G_PM_NPRIMITIVE G_SC_NON_INTERLACE G_TL_TILE G_TT_NONE G_TD_CLAMP G_TP_PERSP G_AC_NONE G_CK_NONE G_CD_BAYER G_CC_SHADE G_TC_FILT G_TF_BILERP SPLIT_Z_CFB TENEMENT ATHERTON M_GFXTASK OS_PRIORITY_PIMGR OS_TASK_DP_WAIT SP_UCODE_SIZE SP_UCODE_DATA_SIZE SP_DRAM_STACK_SIZE8 G_MTX_PROJECTION G_MTX_MODELVIEW G_MTX_LOAD G_MTX_NOPUSH G_ZBUFFER G_RM_AA_ZB_OPA_SURF G_RM_AA_ZB_OPA_SURF2 G_RM_ZB_OPA_SURF G_RM_ZB_OPA_SURF2 G_RM_OPA_SURF G_RM_OPA_SURF2 G_RM_AA_OPA_SURF G_RM_AA_OPA_SURF2 FRUSTRATIO_1 FRUSTRATIO_2 FRUSTRATIO_3 FRUSTRATIO_4 FRUSTRATIO_5 FRUSTRATIO_6 G_IMMFIRST G_TRI G_CULLDL G_POPMTX G_MOVEWORD G_TEXTURE G_SETOTHERMODE_H G_SETOTHERMODE_L G_ENDDL G_SETGEOMETRYMODE G_CLEARGEOMETRYMODE G_LINE G_RDPHALF_ G_RDPHALF_ G_MODIFYVTX G_TRI G_BRANCH_Z G_LOAD_UCODE G_RDPHALF_CONT G_SPRITE G_SPRITE G_SETCIMG G_SETZIMG G_SETTIMG G_SETCOMBINE G_SETENVCOLOR G_SETPRIMCOLOR G_SETBLENDCOLOR G_SETFOGCOLOR G_SETFILLCOLOR G_FILLRECT G_SETTILE G_LOADTILE G_LOADBLOCK G_SETTILESIZE G_LOADTLUT G_RDPSETOTHERMODE G_SETPRIMDEPTH G_SETSCISSOR G_SETCONVERT G_SETKEYR G_SETKEYGB G_RDPFULLSYNC G_RDPTILESYNC G_RDPPIPESYNC G_RDPLOADSYNC G_TEXRECTFLIP G_TEXRECT G_TRI_FILL G_TRI_SHADE G_TRI_TXTR G_TRI_SHADE_TXTR G_TRI_FILL_ZBUFF G_TRI_SHADE_ZBUFF G_TRI_TXTR_ZBUFF G_TRI_SHADE_TXTR_ZBUFF G_RDP_TRI_FILL_MASK G_RDP_TRI_SHADE_MASK G_RDP_TRI_TXTR_MASK G_RDP_TRI_ZBUFF_MASK BOWTIE_VAL G_RDP_ADDR_FIXUP G_RDP_TEXRECT_CHECK G_DMACMDSIZ G_IMMCMDSIZ G_RDPCMDSIZ G_TEXTURE_IMAGE_FRAC G_TEXTURE_SCALE_FRAC G_SCALE_FRAC G_ROTATE_FRAC G_MAXFBZ G_MTX_MODELVIEW G_MTX_PROJECTION G_MTX_MUL G_MTX_LOAD G_MTX_NOPUSH G_MTX_PUSH G_MTX_MODELVIEW G_MTX_PROJECTION G_MTX_MUL G_MTX_LOAD G_MTX_NOPUSH G_MTX_PUSH G_ZBUFFER G_SHADE G_TEXTURE_ENABLE G_SHADING_SMOOTH G_CULL_FRONT G_CULL_BACK G_CULL_BOTH G_TEXTURE_ENABLE G_SHADING_SMOOTH G_CULL_FRONT G_CULL_BACK G_CULL_BOTH G_FOG G_LIGHTING G_TEXTURE_GEN G_TEXTURE_GEN_LINEAR G_LOD G_CLIPPING G_CLIPPING G_FOG_H G_LIGHTING_H G_TEXTURE_GEN_H G_TEXTURE_GEN_LINEAR_H G_LOD_H G_CLIPPING_H G_TX_LOADTILE G_TX_RENDERTILE G_TX_NOMIRROR G_TX_WRAP G_TX_MIRROR G_TX_CLAMP G_TX_NOMASK G_TX_NOLOD G_IM_FMT_RGBA G_IM_FMT_YUV G_IM_FMT_CI G_IM_FMT_IA G_IM_FMT_I G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_DD G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_IM_SIZ_ G_CCMUX_COMBINED G_CCMUX_TEXEL G_CCMUX_TEXEL G_CCMUX_PRIMITIVE G_CCMUX_SHADE G_CCMUX_ENVIRONMENT G_CCMUX_CENTER G_CCMUX_SCALE G_CCMUX_COMBINED_ALPHA G_CCMUX_TEXEL G_CCMUX_TEXEL G_CCMUX_PRIMITIVE_ALPHA G_CCMUX_SHADE_ALPHA G_CCMUX_ENV_ALPHA G_CCMUX_LOD_FRACTION G_CCMUX_PRIM_LOD_FRAC G_CCMUX_NOISE G_CCMUX_K G_CCMUX_K G_CCMUX_ G_CCMUX_ G_ACMUX_COMBINED G_ACMUX_TEXEL G_ACMUX_TEXEL G_ACMUX_PRIMITIVE G_ACMUX_SHADE G_ACMUX_ENVIRONMENT G_ACMUX_LOD_FRACTION G_ACMUX_PRIM_LOD_FRAC G_ACMUX_ G_ACMUX_ G_CC_PRIMITIVE G_CC_SHADE G_CC_MODULATEI G_CC_MODULATEIA G_CC_MODULATEIDECALA G_CC_MODULATERGB G_CC_MODULATERGBA G_CC_MODULATERGBDECALA G_CC_MODULATEI_PRIM G_CC_MODULATEIA_PRIM G_CC_MODULATEIDECALA_PRIM G_CC_MODULATERGB_PRIM G_CC_MODULATERGBA_PRIM G_CC_MODULATERGBDECALA_PRIM G_CC_DECALRGB G_CC_DECALRGBA G_CC_BLENDI G_CC_BLENDIA G_CC_BLENDIDECALA G_CC_BLENDRGBA G_CC_BLENDRGBDECALA G_CC_ADDRGB G_CC_ADDRGBDECALA G_CC_REFLECTRGB G_CC_REFLECTRGBDECALA G_CC_HILITERGB G_CC_HILITERGBA G_CC_HILITERGBDECALA G_CC_SHADEDECALA G_CC_BLENDPE G_CC_BLENDPEDECALA _G_CC_BLENDPE _G_CC_BLENDPEDECALA _G_CC_TWOCOLORTEX _G_CC_SPARSEST G_CC_TEMPLERP G_CC_TRILERP G_CC_INTERFERENCE G_CC_ G_CC_YUV G_CC_PASS G_CC_MODULATEI G_CC_MODULATEIA G_CC_MODULATERGB G_CC_MODULATERGBA G_CC_MODULATEI_PRIM G_CC_MODULATEIA_PRIM G_CC_MODULATERGB_PRIM G_CC_MODULATERGBA_PRIM G_CC_DECALRGB G_CC_BLENDI G_CC_BLENDIA G_CC_CHROMA_KEY G_CC_HILITERGB G_CC_HILITERGBA G_CC_HILITERGBDECALA G_CC_HILITERGBPASSA G_MDSFT_ALPHACOMPARE G_MDSFT_ZSRCSEL G_MDSFT_RENDERMODE G_MDSFT_BLENDER G_MDSFT_BLENDMASK G_MDSFT_ALPHADITHER G_MDSFT_RGBDITHER G_MDSFT_COMBKEY G_MDSFT_TEXTCONV G_MDSFT_TEXTFILT G_MDSFT_TEXTLUT G_MDSFT_TEXTLOD G_MDSFT_TEXTDETAIL G_MDSFT_TEXTPERSP G_MDSFT_CYCLETYPE G_MDSFT_COLORDITHER G_MDSFT_PIPELINE G_PM_ G_PM_NPRIMITIVE G_CYC_ G_CYC_ G_CYC_COPY G_CYC_FILL G_TP_NONE G_TP_PERSP G_TD_CLAMP G_TD_SHARPEN G_TD_DETAIL G_TL_TILE G_TL_LOD G_TT_NONE G_TT_RGBA G_TT_IA G_TF_POINT G_TF_AVERAGE G_TF_BILERP G_TC_CONV G_TC_FILTCONV G_TC_FILT G_CK_NONE G_CK_KEY G_CD_MAGICSQ G_CD_BAYER G_CD_NOISE G_CD_DISABLE G_CD_ENABLE G_CD_ENABLE G_CD_DISABLE G_AD_PATTERN G_AD_NOTPATTERN G_AD_NOISE G_AD_DISABLE G_AC_NONE G_AC_THRESHOLD G_AC_DITHER G_ZS_PIXEL G_ZS_PRIM AA_EN Z_CMP Z_UPD IM_RD CLR_ON_CVG CVG_DST_CLAMP CVG_DST_WRAP CVG_DST_FULL CVG_DST_SAVE ZMODE_OPA ZMODE_INTER ZMODE_XLU ZMODE_DEC CVG_X_ALPHA ALPHA_CVG_SEL FORCE_BL TEX_EDGE G_BL_CLR_IN G_BL_CLR_MEM G_BL_CLR_BL G_BL_CLR_FOG G_BL_ G_BL_A_MEM G_BL_A_IN G_BL_A_FOG G_BL_A_SHADE G_BL_ G_BL_ G_RM_AA_ZB_OPA_SURF G_RM_AA_ZB_OPA_SURF G_RM_AA_ZB_XLU_SURF G_RM_AA_ZB_XLU_SURF G_RM_AA_ZB_OPA_DECAL G_RM_AA_ZB_OPA_DECAL G_RM_AA_ZB_XLU_DECAL G_RM_AA_ZB_XLU_DECAL G_RM_AA_ZB_OPA_INTER G_RM_AA_ZB_OPA_INTER G_RM_AA_ZB_XLU_INTER G_RM_AA_ZB_XLU_INTER G_RM_AA_ZB_XLU_LINE G_RM_AA_ZB_XLU_LINE G_RM_AA_ZB_DEC_LINE G_RM_AA_ZB_DEC_LINE G_RM_AA_ZB_TEX_EDGE G_RM_AA_ZB_TEX_EDGE G_RM_AA_ZB_TEX_INTER G_RM_AA_ZB_TEX_INTER G_RM_AA_ZB_SUB_SURF G_RM_AA_ZB_SUB_SURF G_RM_AA_ZB_PCL_SURF G_RM_AA_ZB_PCL_SURF G_RM_AA_ZB_OPA_TERR G_RM_AA_ZB_OPA_TERR G_RM_AA_ZB_TEX_TERR G_RM_AA_ZB_TEX_TERR G_RM_AA_ZB_SUB_TERR G_RM_AA_ZB_SUB_TERR G_RM_RA_ZB_OPA_SURF G_RM_RA_ZB_OPA_SURF G_RM_RA_ZB_OPA_DECAL G_RM_RA_ZB_OPA_DECAL G_RM_RA_ZB_OPA_INTER G_RM_RA_ZB_OPA_INTER G_RM_AA_OPA_SURF G_RM_AA_OPA_SURF G_RM_AA_XLU_SURF G_RM_AA_XLU_SURF G_RM_AA_XLU_LINE G_RM_AA_XLU_LINE G_RM_AA_DEC_LINE G_RM_AA_DEC_LINE G_RM_AA_TEX_EDGE G_RM_AA_TEX_EDGE G_RM_AA_SUB_SURF G_RM_AA_SUB_SURF G_RM_AA_PCL_SURF G_RM_AA_PCL_SURF G_RM_AA_OPA_TERR G_RM_AA_OPA_TERR G_RM_AA_TEX_TERR G_RM_AA_TEX_TERR G_RM_AA_SUB_TERR G_RM_AA_SUB_TERR G_RM_RA_OPA_SURF G_RM_RA_OPA_SURF G_RM_ZB_OPA_SURF G_RM_ZB_OPA_SURF G_RM_ZB_XLU_SURF G_RM_ZB_XLU_SURF G_RM_ZB_OPA_DECAL G_RM_ZB_OPA_DECAL G_RM_ZB_XLU_DECAL G_RM_ZB_XLU_DECAL G_RM_ZB_CLD_SURF G_RM_ZB_CLD_SURF G_RM_ZB_OVL_SURF G_RM_ZB_OVL_SURF G_RM_ZB_PCL_SURF G_RM_ZB_PCL_SURF G_RM_OPA_SURF G_RM_OPA_SURF G_RM_XLU_SURF G_RM_XLU_SURF G_RM_CLD_SURF G_RM_CLD_SURF G_RM_TEX_EDGE G_RM_TEX_EDGE G_RM_PCL_SURF G_RM_PCL_SURF G_RM_ADD G_RM_ADD G_RM_NOOP G_RM_NOOP G_RM_VISCVG G_RM_VISCVG G_RM_OPA_CI G_RM_OPA_CI G_RM_FOG_SHADE_A G_RM_FOG_PRIM_A G_RM_PASS G_CV_K G_CV_K G_CV_K G_CV_K G_CV_K G_CV_K G_SC_NON_INTERLACE G_SC_ODD_INTERLACE G_SC_EVEN_INTERLACE G_DL_PUSH G_DL_NOPUSH G_MAXZ G_MW_MATRIX G_MW_NUMLIGHT G_MW_CLIP G_MW_SEGMENT G_MW_FOG G_MW_LIGHTCOL G_MW_FORCEMTX G_MW_POINTS G_MW_PERSPNORM G_MWO_NUMLIGHT G_MWO_CLIP_RNX G_MWO_CLIP_RNY G_MWO_CLIP_RPX G_MWO_CLIP_RPY G_MWO_SEGMENT_ G_MWO_SEGMENT_ G_MWO_SEGMENT_ G_MWO_SEGMENT_ G_MWO_SEGMENT_ G_MWO_SEGMENT_ G_MWO_SEGMENT_ G_MWO_SEGMENT_ G_MWO_SEGMENT_ G_MWO_SEGMENT_ G_MWO_SEGMENT_A G_MWO_SEGMENT_B G_MWO_SEGMENT_C G_MWO_SEGMENT_D G_MWO_SEGMENT_E G_MWO_SEGMENT_F G_MWO_FOG G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_aLIGHT_ G_MWO_bLIGHT_ G_MWO_MATRIX_XX_XY_I G_MWO_MATRIX_XZ_XW_I G_MWO_MATRIX_YX_YY_I G_MWO_MATRIX_YZ_YW_I G_MWO_MATRIX_ZX_ZY_I G_MWO_MATRIX_ZZ_ZW_I G_MWO_MATRIX_WX_WY_I G_MWO_MATRIX_WZ_WW_I G_MWO_MATRIX_XX_XY_F G_MWO_MATRIX_XZ_XW_F G_MWO_MATRIX_YX_YY_F G_MWO_MATRIX_YZ_YW_F G_MWO_MATRIX_ZX_ZY_F G_MWO_MATRIX_ZZ_ZW_F G_MWO_MATRIX_WX_WY_F G_MWO_MATRIX_WZ_WW_F G_MWO_POINT_RGBA G_MWO_POINT_ST G_MWO_POINT_XYSCREEN G_MWO_POINT_ZSCREEN FR_NEG_FRUSTRATIO_ FR_POS_FRUSTRATIO_ FR_NEG_FRUSTRATIO_ FR_POS_FRUSTRATIO_ FR_NEG_FRUSTRATIO_ FR_POS_FRUSTRATIO_ FR_NEG_FRUSTRATIO_ FR_POS_FRUSTRATIO_ FR_NEG_FRUSTRATIO_ FR_POS_FRUSTRATIO_ FR_NEG_FRUSTRATIO_ FR_POS_FRUSTRATIO_ G_BZ_PERSP G_BZ_ORTHO NUMLIGHTS_0 NUMLIGHTS_1 NUMLIGHTS_2 NUMLIGHTS_3 NUMLIGHTS_4 NUMLIGHTS_5 NUMLIGHTS_6 NUMLIGHTS_7 LIGHT_1 LIGHT_2 LIGHT_3 LIGHT_4 LIGHT_5 LIGHT_6 LIGHT_7 LIGHT_8 G_TX_LOADTILE G_TX_RENDERTILE G_TX_NOMIRROR G_TX_WRAP G_TX_MIRROR G_TX_CLAMP G_TX_NOMASK G_TX_NOLOD G_TX_DXT_FRAC G_TX_LDBLK_MAX_TXL G_TX_LDBLK_MAX_TXL G_CC_MULPRIMSHADE NU_AU_CLIST_LEN NU_AU_CHANNELS NU_AU_MGR_THREAD_PRI NU_AU_HEAP_ADDR NU_AU_HEAP_SIZE NU_AU_FIFO_LENGTH NU_AU_SYN_UPDATE_MAX NU_AU_OUTPUT_RATE NU_AU_DMA_BUFFER_NUM NU_AU_DMA_BUFFER_SIZE G_NOOP G_RDPHALF_2 G_SETOTHERMODE_H G_SETOTHERMODE_L G_RDPHALF_1 G_SPNOOP G_ENDDL G_DL G_LOAD_UCODE G_MOVEMEM G_MOVEWORD G_MTX G_GEOMETRYMODE G_POPMTX G_TEXTURE G_DMA_IO G_SPECIAL_1 G_SPECIAL_2 G_SPECIAL_3 G_VTX G_MODIFYVTX G_CULLDL G_BRANCH_Z G_TRI1 G_TRI2 G_QUAD G_LINE3D G_SPNOOP G_MTX G_RESERVED0 G_MOVEMEM G_VTX G_RESERVED1 G_DL G_RESERVED2 G_RESERVED3 G_SPRITE2D_BASE NU_AU_SYN_VVOICE_MAX NU_AU_SYN_PVOICE_MAX NU_AU_SEQ_VOICE_MAX NU_AU_SEQ_EVENT_MAX NU_AU_SEQ_CHANNEL_MAX NU_AU_SND_SOUND_MAX NU_AU_SND_EVENT_MAX AL_FX_NONE OS_VI_NTSC_LPN1 OS_VI_NTSC_LPF1 OS_VI_NTSC_LAN1 OS_VI_NTSC_LAF1 OS_VI_NTSC_LPN2 OS_VI_NTSC_LPF2 OS_VI_NTSC_LAN2 OS_VI_NTSC_LAF2 OS_VI_NTSC_HPN1 OS_VI_NTSC_HPF1 OS_VI_NTSC_HAN1 OS_VI_NTSC_HAF1 OS_VI_NTSC_HPN2 OS_VI_NTSC_HPF2 OS_VI_PAL_LPN1 OS_VI_PAL_LPF1 OS_VI_PAL_LAN1 OS_VI_PAL_LAF1 OS_VI_PAL_LPN2 OS_VI_PAL_LPF2 OS_VI_PAL_LAN2 OS_VI_PAL_LAF2 OS_VI_PAL_HPN1 OS_VI_PAL_HPF1 OS_VI_PAL_HAN1 OS_VI_PAL_HAF1 OS_VI_PAL_HPN2 OS_VI_PAL_HPF2 OS_VI_MPAL_LPN1 OS_VI_MPAL_LPF1 OS_VI_MPAL_LAN1 OS_VI_MPAL_LAF1 OS_VI_MPAL_LPN2 OS_VI_MPAL_LPF2 OS_VI_MPAL_LAN2 OS_VI_MPAL_LAF2 OS_VI_MPAL_HPN1 OS_VI_MPAL_HPF1 OS_VI_MPAL_HAN1 OS_VI_MPAL_HAF1 OS_VI_MPAL_HPN2 OS_VI_MPAL_HPF2 OS_VI_FPAL_LPN1 OS_VI_FPAL_LPF1 OS_VI_FPAL_LAN1 OS_VI_FPAL_LAF1 OS_VI_FPAL_LPN2 OS_VI_FPAL_LPF2 OS_VI_FPAL_LAN2 OS_VI_FPAL_LAF2 OS_VI_FPAL_HPN1 OS_VI_FPAL_HPF1 OS_VI_FPAL_HAN1 OS_VI_FPAL_HAF1 OS_VI_FPAL_HPN2 OS_VI_FPAL_HPF2 NU_GFX_UCODE_F3DEX2 G_RM_AA_ZB_XLU_SURF2 G_RM_AA_ZB_OPA_DECAL2 G_RM_AA_ZB_XLU_DECAL2 G_RM_AA_ZB_OPA_INTER2 G_RM_AA_ZB_XLU_INTER2 G_RM_AA_ZB_XLU_LINE2 G_RM_AA_ZB_DEC_LINE2 G_RM_AA_ZB_TEX_INTER2 G_RM_AA_ZB_SUB_SURF2 G_RM_AA_ZB_PCL_SURF2 G_RM_AA_ZB_OPA_TERR2 G_RM_AA_ZB_TEX_TERR2 G_RM_AA_ZB_SUB_TERR2 G_RM_RA_ZB_OPA_SURF2 G_RM_RA_ZB_OPA_DECAL2 G_RM_RA_ZB_OPA_INTER2 G_RM_AA_XLU_SURF2 G_RM_AA_XLU_LINE2 G_RM_AA_DEC_LINE2 G_RM_AA_TEX_EDGE2 G_RM_AA_SUB_SURF2 G_RM_AA_PCL_SURF2 G_RM_AA_OPA_TERR2 G_RM_AA_TEX_TERR2 G_RM_AA_SUB_TERR2 G_RM_RA_OPA_SURF2 G_RM_ZB_OPA_DECAL2 G_RM_ZB_XLU_DECAL2 G_RM_ZB_CLD_SURF2 G_RM_ZB_OVL_SURF2 G_RM_ZB_PCL_SURF2 G_RM_CLD_SURF2 G_RM_TEX_EDGE2 G_RM_PCL_SURF2 G_RM_ADD2 G_CC_PASS2 G_CC_MODULATEI2 G_CC_MODULATEIA2 G_CC_MODULATERGB2 G_CC_MODULATERGBA2 G_CC_MODULATEI_PRIM2 G_CC_MODULATEIA_PRIM2 G_CC_MODULATERGB_PRIM2 G_CC_MODULATERGBA_PRIM2 G_CC_DECALRGB2 G_CC_BLENDI2 G_CC_BLENDIA2 G_CC_HILITERGB2 G_CC_HILITERGBA2 G_CC_HILITERGBDECALA2 G_CC_HILITERGBPASSA2 OS_PRIORITY_APPMAX 11 | if else while do NULL for return default case switch sizeof break continue goto TRUE FALSE 12 | 13 | 14 | GPACK_ZDZ gDPLoadMultiTile_4b gDPLoadMultiTile gsDPLoadMultiTile gsDPLoadMultiTile_4b LeoBootGame LeoByteToLBA LeoCACreateLeoManager LeoCJCreateLeoManager LeoClearQueue LeoCreateLeoManager LeoDriveExist LeoGetAAdr LeoGetAAdr2 LeoGetKAdr LeoInquiry LeoLBAToByte LeoModeSelectAsync LeoReadCapacity LeoReadDiskID LeoReadRTC LeoReadWrite LeoReset LeoResetClear LeoRezero LeoSeek LeoSetRTC LeoSpdlMotor LeoTestUnitReady alAudioFrame alBnkfNew alCents2Ratio alClose alCSeq alCSeqGetLoc alCSeqGetTicks alCSeqNew alCSeqNewMarker alCSeqNextEvent alCSeqSecToTicks alCSeqSetLoc alCSeqTicksToSec alCSPDelete alCSPGetChlFXMix alCSPGetChlPan alCSPGetChlPriority alCSPGetChlProgram alCSPGetChlVol alCSPGetSeq alCSPGetTempo alCSPGetVol alCSPNew alCSPPlay alCSPSendMidi alCSPSetBank alCSPSetChlFXMix alCSPSetChlPan alCSPSetChlPriority alCSPSetChlProgram alCSPSetChlVol alCSPSetSeq alCSPSetVol alCSPStop alHeapAlloc alHeapCheck alHeapInit alInit alParseAbiCL alSeq alSeqFileNew alSeqGetLoc alSeqGetTicks alSeqNew alSeqNewMarker alSeqNextEvent alSeqpDelete alSeqpGetChlFXMix alSeqpGetChlPan alSeqpGetChlPriority alSeqpGetChlProgram alSeqpGetChlVol alSeqpGetSeq alSeqpGetTempo alSeqpGetVol alSeqpLoop alSeqpNew alSeqpPlay alSeqpSendMidi alSeqpSetBank alSeqpSetChlFXMix alSeqpSetChlPan alSeqpSetChlProgram alSeqpSetChlVol alSeqpSetSeq alSeqpSetTempo alSeqpSetVol alSeqpStop alSeqSecToTicks alSeqSetLoc alSeqTicksToSec alSndpAllocate alSndpDeallocate alSndpDelete alSndpGetSound alSndpGetState alSndpNew alSndpPlay alSndpPlayAt alSndpSetFXMix alSndpSetPan alSndpSetPitch alSndpSetPriority alSndpSetSound alSndpSetVol alSndpStop alSynAddPlayer alSynAllocFX alSynAllocVoice alSynDelete alSynFreeFX alSynFreeVoice alSynGetFXRef alSynGetPriority alSynNew alSynRemovePlayer alSynSetFXMix alSynSetFXParam alSynSetPan alSynSetPitch alSynSetPriority alSynSetVol alSynStartVoice alSynStartVoiceParams alSynStopVoice n_alAudioFrame n_alClose n_alCSeqNew n_alCSeqNewMarker n_alCSPDelete n_alCSPGetChlFXMix n_alCSPGetChlPan n_alCSPGetChlPriority n_alCSPGetChlProgram n_alCSPGetChlVol n_alCSPGetSeq n_alCSPGetTempo n_alCSPGetVol n_alCSPNew n_alCSPPlay n_alCSPSetBank n_alCSPSetChlFXMix n_alCSPSetChlPan n_alCSPSetChlPriority n_alCSPSetChlProgram n_alCSPSetChlVol n_alCSPSetSeq n_alCSPSetTempo n_alCSPSetVol n_alCSPStop n_alInit n_alSeqNewMarker n_alSeqNextEvent n_alSeqpDelete n_alSeqpGetChlFXMix n_alSeqpGetChlPan n_alSeqpGetChlPriority n_alSeqpGetChlProgram n_alSeqpGetChlVol n_alSeqpGetSeq n_alSeqpGetTempo n_alSeqpGetVol n_alSeqpLoop n_alSeqpNew n_alSeqpPlay n_alSeqpSendMidi n_alSeqpSetBank n_alSeqpSetChlFXMix n_alSeqpSetChlPan n_alSeqpSetChlPriority n_alSeqpSetChlProgram n_alSeqpSetChlVol n_alSeqpSetSeq n_alSeqpSetTempo n_alSeqpSetVol n_alSeqpStop n_alSndpAllocate n_alSndpDeallocate n_alSndpDelete n_alSndpGetSound n_alSndpGetState n_alSndpNew n_alSndpPlay n_alSndpPlayAt n_alSndpSetFXMix n_alSndpSetPan n_alSndpSetPitch n_alSndpSetPriority n_alSndpSetSound n_alSndpSetVol n_alSndpStop n_alSynAddSeqPlayer n_alSynAddSndPlayer n_alSynAllocFX n_alSynAllocVoice n_alSynDelete n_alSynFreeFX n_alSynFreeVoice n_alSynGetFXRef n_alSynGetPriority n_alSynNew n_alSynRemovePlayer n_alSynSetFXMix n_alSynSetFXParam n_alSynSetPan n_alSynSetPitch n_alSynSetPriority n_alSynSetVol n_alSynStartVoice n_alSynStartVoiceParams n_alSynStopVoice bcmp bcopy bzero sprintf gDPClearOtherMode gDPEndDisplayList gDPFillRectangle gDPFullSync gDPLoadBlock gDPLoadSync gDPLoadTextureBlock gDPLoadTextureBlock_4b gDPLoadTextureTile gDPLoadTextureTile_4b gDPLoadTLUT_pal16 gDPLoadTLUT_pal256 gDPNoOp gDPNoOpTag gDPPipelineMode gDPPipeSync gDPScisFillRectangle gDPSetAlphaCompare gDPSetAlphaDither gDPSetBlendColor gDPSetColorDither gDPSetColorImage gDPSetCombineKey gDPSetCombineMode gDPSetConvert gDPSetCycleType gDPSetDepthImage gDPSetDepthSource gDPSetEnvColor gDPSetFillColor gDPSetFogColor gDPSetHilite1Tile gDPSetHilite2Tile gDPSetKeyGB gDPSetKeyR gDPSetPrimColor gDPSetPrimDepth gDPSetRenderMode gDPSetScissor gDPSetTextureConvert gDPSetTextureDetail gDPSetTextureFilter gDPSetTextureImage gDPSetTextureLOD gDPSetTextureLUT gDPSetTexturePersp gDPSetTile gDPSetTileSize gDPTileSync gsDPClearOtherMode gsDPEndDisplayList gsDPFillRectangle gsDPFullSync gsDPLoadBlock gsDPLoadSync gsDPLoadTextureBlock gsDPLoadTextureBlock_4b gsDPLoadTextureTile gsDPLoadTextureTile_4b gsDPLoadTLUT_pal16 gsDPLoadTLUT_pal256 gsDPNoOp gsDPNoOpTag gsDPPipelineMode gsDPPipeSync gsDPSetAlphaCompare gsDPSetAlphaDither gsDPSetBlendColor gsDPSetColorDither gsDPSetColorImage gsDPSetCombineKey gsDPSetCombineMode gsDPSetConvert gsDPSetCycleType gsDPSetDepthImage gsDPSetDepthSource gsDPSetEnvColor gsDPSetFillColor gsDPSetFogColor gsDPSetHilite1Tile gsDPSetHilite2Tile gsDPSetKeyGB gsDPSetKeyR gsDPSetPrimColor gsDPSetPrimDepth gsDPSetRenderMode gsDPSetScissor gsDPSetTextureConvert gsDPSetTextureDetail gsDPSetTextureFilter gsDPSetTextureImage gsDPSetTextureLOD gsDPSetTextureLUT gsDPSetTexturePersp gsDPSetTile gsDPSetTileSize gsDPTileSync gdSPDefLights0 gdSPDefLights1 gdSPDefLights2 gdSPDefLights3 gdSPDefLights4 gdSPDefLights5 gdSPDefLights6 gdSPDefLights7 gdSPDefLookAt gSP1Triangle gSP2Triangles gSPBgRect1Cyc gSPBgRectCopy gSPBranchLessZ gSPBranchLessZrg gSPBranchList gSPClearGeometryMode gSPClipRatio gSPCullDisplayList gSPDisplayList gSPEndDisplayList gSPFogPosition gSPForceMatrix gSPInsertMatrix gSPLight gSPLightColor gSPLine3D gSPLineW3D gSPLoadUcode gSPLoadUcodeL gSPLookAt gSPLookAtX gSPLookAtY gSPMatrix gSPModifyVertex gSPNumLights gSPObjLoadTxRect gSPObjLoadTxRectR gSPObjLoadTxSprite gSPObjLoadTxtr gSPObjMatrix gSPObjRectangle gSPObjRectangleR gSPObjRenderMode gSPObjSprite gSPObjSubMatrix gSPPerspNormalize gSPPopMatrix gSPScisTextureRectangle gSPSegment gSPSelectBranchDL gSPSelectDL gSPSetGeometryMode gSPSetLights0 gSPSetLights1 gSPSetLights2 gSPSetLights3 gSPSetLights4 gSPSetLights5 gSPSetLights6 gSPSetLights7 gSPSetOtherMode gSPSetStatus gSPSprite2DBase gSPSprite2DDraw gSPSprite2DScaleFlip gSPTexture gSPTextureRectangle gSPTextureRectangleFlip gSPVertex gSPViewport gsSP1Triangle gsSP2Triangles gsSPBgRect1Cyc gsSPBgRectCopy gsSPBranchLessZ gsSPBranchLessZrg gsSPBranchList gsSPClearGeometryMode gsSPClipRatio gsSPCullDisplayList gsSPDisplayList gsSPEndDisplayList gsSPFogPosition gsSPForceMatrix gsSPInsertMatrix gsSPLight gsSPLightColor gsSPLine3D gsSPLineW3D gsSPLoadUcode gsSPLoadUcodeL gsSPLookAt gsSPLookAtX gsSPLookAtY gsSPMatrix gsSPModifyVertex gsSPNumLights gsSPObjLoadTxRect gsSPObjLoadTxRectR gsSPObjLoadTxSprite gsSPObjLoadTxtr gsSPObjMatrix gsSPObjRectangle gsSPObjRectangleR gsSPObjRenderMode gsSPObjSprite gsSPObjSubMatrix gsSPPerspNormalize gsSPPopMatrix gsSPSegment gsSPSelectBranchDL gsSPSelectDL gsSPSetGeometryMode gsSPSetLights0 gsSPSetLights1 gsSPSetLights2 gsSPSetLights3 gsSPSetLights4 gsSPSetLights5 gsSPSetLights6 gsSPSetLights7 gsSPSetOtherMode gsSPSetStatus gsSPSprite2DBase gsSPSprite2DDraw gsSPSprite2DScaleFlip gsSPTexture gsSPTextureRectangle gsSPTextureRectangleFlip gsSPVertex gsSPViewport gtStateSetOthermode guAlign guAlignF guDPLoadTextureTile guFrustum guFrustumF guGetDPLoadTextureTileSz guLoadTextureBlockMipMap guLookAt guLookAtF guLookAtHilite guLookAtHiliteF guLookAtReflect guLookAtReflectF guLookAtStereo guLookAtStereoF guMtxCatF guMtxCatL guMtxF2L guMtxIdent guMtxIdentF guMtxL2F guMtxXFMF guMtxXFML guNormalize guOrtho guOrthoF guParseRdpDL guPerspective guPerspectiveF guPosition guPositionF guPosLight guPosLightHilite guRandom guRotate guRotateF guRotateRPY guRotateRPYF guS2DEmuGBgRect1Cyc guS2DEmuSetScissor guS2DInitBg guScale guScaleF guSprite2DInit guTranslate guTranslateF RAND MusAsk MusFxBankGetCurrent MusFxBankGetPtrBank MusFxBankInitialize MusFxBankNumberOfEffects MusFxBankSetCurrent MusFxBankSetPtrBank MusFxBankSetSingle MusHandleAsk MusHandleGetPtrBank MusHandlePause MusHandleSetFreqOffset MusHandleSetPan MusHandleSetReverb MusHandleSetTempo MusHandleSetVolume MusHandleStop MusHandleUnPause MusHandleWaveAddress MusHandleWaveCount MusInitialize MusPtrBankGetCurrent MusPtrBankInitialize MusPtrBankSetCurrent MusPtrBankSetSingle MusSetFxType MusSetMarkerCallback MusSetMasterVolume MusSetScheduler MusSetSongFxChange MusStartEffect MusStartEffect2 MusStartSong MusStartSongFromMarker MusStop abs acos acosf asin asinf atan atan2 atan2f atanf atof atoi atol bsearch calloc ceil ceilf cos cosf cosh coshf div exp expf fabsf floor floorf fmod fmodf free frexp frexpf hypot hypotf InitHeap isalnum isascii iscntrl isdigit islower isspace isupper isxdigit labs ldexp ldexpf ldiv log log10 log10f logf longjmp malloc malloc_memcheck malloc_memdsp memchr memcmp memcpy memmove memset modf modff pow powf qsort rand realloc setjmp sin sinf sinh sinhf sqrt sqrtf srand strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr strtod strtok strtol strtoul tan tanf tanh tanhf spClearAttribute spColor spDraw spFinish spInit spMove spScale spScissor spSetAttribute spSetZ uhCloseGame uhGLoad uhOpenGame uhPartnerCmd uhReadGame uhReadRamrom uhWriteGame uhWriteRamrom osAfterPreNMI osAiGetLength osAiGetStatus osAiSetFrequency osAiSetNextBuffer osCartRomInit osContGetQuery osContGetReadData osContInit osContReset osContSetCh osContStartQuery osContStartReadData osCreateLog osCreateMesgQueue osCreatePiManager osCreateRegion osCreateScheduler osCreateThread osCreateViManager osDestroyThread osDpGetCounters osDpGetStatus osDpSetNextBuffer osDpSetStatus osEepromLongRead osEepromLongWrite osEepromProbe osEepromRead osEepromWrite osEPiGetDeviceType osEPiLinkHandle osEPiRawReadIo osEPiRawStartDma osEPiRawWriteIo osEPiReadIo osEPiStartDma osEPiWriteIo osFlushLog osFree osGbpakCheckConnector osGbpakGetStatus osGbpakInit osGbpakPower osGbpakReadId osGbpakReadWrite osGetCause osGetCompare osGetConfig osGetCount osGetCurrFaultedThread osGetFpcCsr osGetIntMask osGetMemSize osGetNextFaultedThread osGetRegionBufCount osGetRegionBuffSize osGetSR osGetThreadId osGetThreadPri osGetTime osGetTLBASID osGetTLBHi osGetTLBLo0 osGetTLBLo1 osGetTLBPageMask osInitialize osInitRdb osInvalDCache osInvalICache osJamMesg osLogEvent osMalloc osMapTLB osMotorInit osMotorStart osMotorStop osPfsAllocateFile osPfsChecker osPfsDeleteFile osPfsFileState osPfsFindFile osPfsFreeBlocks osPfsGetLabel osPfsInit osPfsInitPak osPfsIsPlug osPfsNumFiles osPfsReadWriteFile osPfsRepairId osPfsReSizeFile osPfsSetLabel osPhysicalToVirtual osPiGetCmdQueue osPiGetStatus osPiRawReadIo osPiRawStartDma osPiRawWriteIo osPiReadIo osPiStartDma osPiWriteIo osProfileFlush osProfileInit osProfileStart osProfileStop osReadHost osRecvMesg osScAddClient osScGetTaskQ osScRemoveClient osSendMesg osSetCause osSetCompare osSetConfig osSetErrorHandler osSetEventMesg osSetFpcCsr osSetIntMask osSetSR osSetThreadPri osSetTime osSetTimer osSetTLBASID osSpTaskLoad osSpTaskStart osSpTaskStartGo osSpTaskYield osSpTaskYielded osStartThread osStopThread osStopTimer osUnmapTLB osUnmapTLBAll osViBlack osViExtendVStart osViFade osViGetCurrentField osViGetCurrentFramebuffer osViGetCurrentLine osViGetCurrentMode osViGetNextFramebuffer osViGetStatus osViRepeatLine osVirtualToPhysical osViSetEvent osViSetMode osViSetSpecialFeatures osViSetXScale osViSetYScale osViSwapBuffer osVoiceCheckWord osVoiceClearDictionary osVoiceControlGain osVoiceCountSyllables osVoiceGetReadData osVoiceInit osVoiceMaskDictionary osVoiceSetWord osVoiceStartReadData osVoiceStopReadData osWritebackDCache osWritebackDCacheAll osWriteHost osYieldThread OS_CYCLES_TO_NSEC OS_CYCLES_TO_USEC OS_DCACHE_ROUNDUP_ADDR OS_DCACHE_ROUNDUP_SIZE OS_K0_TO_PHYSICAL OS_K1_TO_PHYSICAL OS_NSEC_TO_CYCLES OS_PHYSICAL_TO_K0 OS_PHYSICAL_TO_K1 OS_USEC_TO_CYCLES nuScCreateScheduler nuScAddClient nuScRemoveClient nuPreNMIFuncSet nuPreNMIFuncRemove nuScGetGfxMQ nuScGetAudioMQ nuScResetClientMesgType nuScGetFrameRate nuScSetFrameBufferNum nuGfxInit nuGfxTaskMgrInit nuGfxTaskStart nuGfxFuncSet nuGfxFuncRemove nuGfxPreNMIFuncSet nuGfxPreNMIFuncRemove nuGfxSwapCfbFuncSet nuGfxSwapCfbFuncRemove nuGfxTaskEndFuncSet nuGfxTaskEndFuncRemove nuGfxSwapCfb nuGfxSetCfb nuGfxTaskAllEndWait nuGfxRetraceWait nuGfxDisplayOff nuGfxDisplayOn nuGfxSetZBuffer nuGfxSetUcode nuSiMgrInit nuSiCallBackAdd nuSiCallBackRemove nuSiMgrStop nuSiMgrRestart nuSiSendMesg nuSiSendMesgNW nuContInit nuContMgrInit nuContMgrRemove nuContDataLock nuContDataUnLock nuContDataRead nuContQueryRead nuContDataGet nuContDataGetAll nuContDataReadStart nuContDataReadWait nuContDataGetEx nuContDataGetExAll nuContReadFuncSet nuContReadFuncRemove nuContPakMgrInit nuContPakMgrRemove nuContPakOpen nuContPakFileFread nuContPakFileFwrite nuContPakFileOpen nuContPakFileOpenJis nuContPakFileReadWrite nuContPakFileRead nuContPakFileWrite nuContPakCodeSet nuContPakRepairId nuContPakJisToN64 nuContPakN64ToJis nuContPakGetFree nuContPakFileDelete nuContPakFileDeleteJis nuContPakFileState nuContPakFileNum nuContPakFileFind nuContPakFileFindJis nuContRmbMgrInit nuContRmbMgrRemove nuContRmbCheck nuContRmbStart nuContRmbStop nuContRmbModeSet nuContRmbForceStop nuContRmbForceStopEnd nuContRmbSearchTimeSet nuContGBPakMgrInit nuContGBPakMgrRemove nuContGBPakOpen nuContGBPakGetStatus nuContGBPakReadID nuContGBPakFread nuContGBPakFwrite nuContGBPakReadWrite nuContGBPakPower nuContGBPakCheckConnector nuContGBPakRegWrite nuVrsMgrInit nuVrsOpen nuVrsClearDictionary nuVrsSetWord nuVrsMaskDictionary nuVrsStartReadData nuVrsGetReadData nuVrsStopReadData nuVrsControlGain nuVrsCheckWord nuVrsCountSyllables nuEepromMgrInit nuEepromMgrRemove nuEepromCheck nuEepromRead nuEepromWrite nuAuInit nuAuInitEx nuAuMgrInit nuAuMgrInitEx nuAuPreNMIFuncSet nuAuPreNMIFuncRemove nuAuHeapAlloc nuAuHeapGetFree nuAuHeapGetUsed nuAuSeqPlayerInit nuAuSeqPlayerBankSet nuAuSeqPlayerSeqSet nuAuSeqPlayerPlay nuAuSeqPlayerSetNo nuAuSeqPlayerFadeOut nuAuSeqPlayerGetState nuAuSeqPlayerStop nuAuSeqPlayerGetSeqno nuAuSeqPlayerGetTempo nuAuSeqPlayerSetTempo nuAuSeqPlayerGetVol nuAuSeqPlayerSetVol nuAuSeqPlayerGetChlPan nuAuSeqPlayerSetChlPan nuAuSeqPlayerGetChlVol nuAuSeqPlayerSetChlVol nuAuSeqPlayerGetChlProgram nuAuSeqPlayerSetChlProgram nuAuSeqPlayerGetChlFXMix nuAuSeqPlayerSetChlFXMix nuAuSeqPlayerGetChlPriority nuAuSeqPlayerSetChlPriority nuAuSeqPlayerSendMidi nuAuSndPlayerInit nuAuSndPlayerBankSet nuAuSndPlayerPlay nuAuSndPlayerSetSound nuAuSndPlayerStop nuAuSndPlayerGetState nuAuSndPlayerSetPitch nuAuSndPlayerSetVol nuAuSndPlayerSetPan nuAuSndPlayerSetPriority nuAuSndPlayerSetFXMix nuAuStlInit nuAuStlMgrInit nuAuStlPtrBankInit nuAuStlPtrBankSet nuAuStlHeapAlloc nuAuStlHeapGetFree nuAuStlHeapGetUsed nuAuStlSeqPlayerInit nuAuStlSeqPlayerDataSet nuAuStlSeqPlayerPlay nuAuStlSeqPlayerGetState nuAuStlSeqPlayerStop nuAuStlSeqPlayerSetMasterVol nuAuStlSeqPlayerGetSeqState nuAuStlSeqPlayerSeqStop nuAuStlSeqPlayerSetSeqTempo nuAuStlSeqPlayerSetSeqVol nuAuStlSeqPlayerSetSeqPan nuAuStlSndPlayerPlay nuAuStlSndPlayerPlay2 nuAuStlSndPlayerGetState nuAuStlSndPlayerStop nuAuStlSndPlayerSetMasterVol nuAuStlSndPlayerGetSndState nuAuStlSndPlayerSndStop nuAuStlSndPlayerSetSndVol nuAuStlSndPlayerSetSndPan nuAuStlSndPlayerSetSndPitch nuPiInit nuPiReadRom nuPiInitSram nuPiReadWriteSram nuPiReadSram nuPiWriteSram nuDebTaskPerfBar0 nuDebTaskPerfBar0EX2 nuDebTaskPerfBar1 nuDebTaskPerfBar1EX2 nuDebConDisp nuDebConDispEX2 nuDebConPrintf nuDebConWindowSet nuDebConWindowSize nuDebConWindowPos nuDebConWindowShow nuDebConScroll nuDebConTextColor nuDebConTextPos nuDebConTextAttr nuDebConClear nuDebConPutc nuDebConCPuts nuDebConPuts GPACK_RGBA5551 gSPSetLights1 gSPSetLights2 gSPSetLights3 gSPSetLights4 gSPSetLights5 gSPSetLights6 gSPSetLights7 gsSPSetLights1 gsSPSetLights2 gsSPSetLights3 gsSPSetLights4 gsSPSetLights5 gsSPSetLights6 gsSPSetLights7 uhOpenGame uhCloseGame uhReadGame uhWriteGame uhWriteRamrom uhReadRamrom uhPartnerCmd uhGload 15 | 16 | 17 | osSyncPrintf nuContPakFileReSize nuContPakFileReSizeJis nuContPakFuncSet nuContPakFuncRemove nuContRmbFuncSet nuContRmbFuncRemove nuAuStlPlayerInit nuAuStlBankSet nuAuStlSeqPlayerSetData LeoModeSelect alCSPGetChannelPriority alCSPGetFXMix alCSPGetPan alCSPGetProgram alCSPGetTime alCSPSetChannelPriority alCSPSetFXMix alCSPSetPan alCSPSetProgram alCSPSetTempo alCSPSetTime alSeqpGetChannelPriority alSeqpGetFXMix alSeqpGetPan alSeqpGetProgram alSeqpGetTime alSeqpSetChannelPriority alSeqpSetChlPriority alSeqpSetFXMix alSeqpSetPan alSeqpSetProgram alSeqpSetTime alSndpHeapSize alSynHeapSize gSPNearClip gsSPNearClip guDumpGbiDL guParseGbiDL osAckRamromRead osAckRamromWrite osTestHost 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /N64C.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buu342/NPP-N64SyntaxHighlighter/c3ed3d1fec454fef6e23124b66c897d6013c55d7/N64C.dll -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nintendo 64 C Notepad++ Syntax Highlighter 2 | Provides Syntax Highlighting and Auto-Completion functions for Nintendo 64 C. For use with Notepad++. 3 | ![Screenshot](https://i.imgur.com/fZ1lWGY.png)

4 | 5 | ### Installation 6 | If you are unsure of your Notepad++ version, simply Launch the program and go to ? -> About Notepad++ (Shortcut F1)
7 | 8 |
Notepad++ 7.7 or higher 9 |

10 | 11 | 1. Download this repository 12 | 2. From the downloaded repository, open the APIs folder, copy the `C (N64).xml`, and paste it into the `autoCompletion` folder inside the Notepad++ install folder (for example `C:/Program Files/Notepad++/`). 13 | 3. Launch Notepad++ 14 | 4. Click Language -> User Defined Language -> Define your language... 15 | 5. Click Import... 16 | 6. Go to the `UDL` folder inside the downloaded repository, and import the `.xml` file. It should say "import successful". You might need to restart Notepad++. 17 | 7. Open a Nintendo 64 C source file 18 | 8. Click Language -> C (N64). Since it is a UDL, it should be at the bottom. 19 | 9. Click on Settings -> Preferences -> Auto-Completion, enable both Auto-Completion and Function parameters hints 20 |

21 |
22 | 23 |
Notepad++ 7.6 24 |

25 | 26 | 1. Download this repository 27 | 2. Go to your Notepad++ install folder (for example `C:/Program Files/Notepad++/`) 28 | 3. Place the APIs folder inside the `Notepad++/plugins` folder 29 | 4. Go to `C:/ProgramData/Notepad++/plugins` and create a new folder called N64C and place the .dll in there. Then go to `C:/Users/YOURUSERNAME/AppData/Roaming/Notepad++/plugins/` and place the config folder in here, overwriting if necessary. 30 | 5. Launch Notepad++ 31 | 6. Open a Nintendo 64 C source file 32 | 7. Click Language -> C (N64) 33 | 8. Click on Settings -> Preferences -> Auto-Completion, enable both Auto-Completion and Function parameters hints 34 |

35 |
36 | 37 |
Notepad++ 7.5 or lower 38 |

39 | 40 | 1. Download this repository 41 | 2. Go to your Notepad++ install folder (for example `C:/Program Files/Notepad++/`) 42 | 3. Place the APIs folder inside the `Notepad++/plugins` folder 43 | 4. Place the .dll and Config folder in here as well. 44 | 5. Launch Notepad++ 45 | 6. Open a Nintendo 64 C source file 46 | 7. Click language -> C (N64) 47 | 8. Click on Settings -> Preferences -> Auto-Completion, enable both Auto-Completion and Function parameters hints 48 |

49 |
50 |
51 | 52 | ### Configuration 53 |
Notepad++ 7.7 or higher 54 |

55 | 56 | **Highlighting -** Language -> User Defined Language -> Define your language..., select `C (N64)` from the dropdown, and modify to your liking. Alternatively, go to `C:/Users/YOURUSERNAME/AppData/Roaming/Notepad++/` and modify `userDefineLang.xml`. Alternatively, manually edit the XML file and re-import it (make sure you remove the old one first or you'll have duplicate entries). 57 | 58 | **Autocompletion -** Edit the XML file inside the `Notepad++/autoCompletion` folder 59 |

60 |
61 | 62 |
Notepad++ 7.6 or lower 63 |

64 | 65 | **Highlighting -** Settings -> Style Configurator -> C (N64), or edit the XML file inside the config folder. 66 | 67 | **Autocompletion -** Edit the XML file inside the `Notepad++/plugins/APIs` folder 68 |

69 |
70 |
71 | 72 | ### How to compile the source code 73 | 1. Download and install a copy of [Visual Studio 2008](https://www.microsoft.com/en-us/download/details.aspx?id=7873). 74 | 2. Download a copy of [Notepad++ 5.8's source code](https://github.com/notepad-plus-plus/notepad-plus-plus/releases/tag/v5.8). 75 | 3. Place the NP++ Source code in a folder. 76 | 4. Place this syntax highlighter's source code in the same folder so it is next to the PowerEditor and Scintilla folders. 77 | 5. Rename the sourcecode folder to N64C 78 | 6. Open the project in Visual Studio 8. 79 | 7. Ensure that you are compiling as "Unicode Release". 80 | 8. Compile Scintilla, then compile PowerEditor, then compile this syntax highlighter.

81 | 82 | ### Bugs 83 |
Notepad++ 7.7 or higher 84 |

85 | 86 | * Comment Doc highlighting is not supported 87 |

88 |
89 | 90 |
Notepad++ 7.6 or lower 91 |

92 | 93 | * #if and #end macros will not have code folding if there is a space between the hastag and first character (example, # if) 94 | * The F in a floating point number is not highlighted (example, 10.0F). L is also not highlighted. 95 |

96 |
97 | 98 | Please notify me about missing functions so that I can add them to the XML file.

99 | 100 | ### FAQ 101 | **Q:** Function 'X' is missing or has something wrong.
102 | **A:** You can correct it by editing the XML file, but please contact me too so I can correct it for everyone else!

103 | 104 | **Q:** Can you make this for "Editor Name Here"?
105 | **A:** I don't use "Editor Name Here" so I can't help much, however given how easy it is to open the XML file there's nothing stopping you from grabbing all the function names and adding them yourself

106 | 107 | ### Special Thanks 108 | Kyle Fleming (aka Garthex) for the original plugin. 109 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldAccessor.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Accessor.h 3 | ** Rapid easy access to contents of a Scintilla. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8}; 9 | 10 | class Accessor; 11 | 12 | typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len); 13 | 14 | /** 15 | * Interface to data in a Scintilla. 16 | */ 17 | class Accessor { 18 | protected: 19 | enum {extremePosition=0x7FFFFFFF}; 20 | /** @a bufferSize is a trade off between time taken to copy the characters 21 | * and retrieval overhead. 22 | * @a slopSize positions the buffer before the desired position 23 | * in case there is some backtracking. */ 24 | enum {bufferSize=4000, slopSize=bufferSize/8}; 25 | char buf[bufferSize+1]; 26 | int startPos; 27 | int endPos; 28 | int codePage; 29 | 30 | virtual bool InternalIsLeadByte(char ch)=0; 31 | virtual void Fill(int position)=0; 32 | 33 | public: 34 | Accessor() : startPos(extremePosition), endPos(0), codePage(0) {} 35 | virtual ~Accessor() {} 36 | char operator[](int position) { 37 | if (position < startPos || position >= endPos) { 38 | Fill(position); 39 | } 40 | return buf[position - startPos]; 41 | } 42 | /** Safe version of operator[], returning a defined value for invalid position. */ 43 | char SafeGetCharAt(int position, char chDefault=' ') { 44 | if (position < startPos || position >= endPos) { 45 | Fill(position); 46 | if (position < startPos || position >= endPos) { 47 | // Position is outside range of document 48 | return chDefault; 49 | } 50 | } 51 | return buf[position - startPos]; 52 | } 53 | bool IsLeadByte(char ch) { 54 | return codePage && InternalIsLeadByte(ch); 55 | } 56 | void SetCodePage(int codePage_) { codePage = codePage_; } 57 | 58 | virtual bool Match(int pos, const char *s)=0; 59 | virtual char StyleAt(int position)=0; 60 | virtual int GetLine(int position)=0; 61 | virtual int LineStart(int line)=0; 62 | virtual int LevelAt(int line)=0; 63 | virtual int Length()=0; 64 | virtual void Flush()=0; 65 | virtual int GetLineState(int line)=0; 66 | virtual int SetLineState(int line, int state)=0; 67 | virtual int GetPropertyInt(const char *key, int defaultValue=0)=0; 68 | virtual char *GetProperties()=0; 69 | 70 | // Style setting 71 | virtual void StartAt(unsigned int start, char chMask=31)=0; 72 | virtual void SetFlags(char chFlags_, char chWhile_)=0; 73 | virtual unsigned int GetStartSegment()=0; 74 | virtual void StartSegment(unsigned int pos)=0; 75 | virtual void ColourTo(unsigned int pos, int chAttr)=0; 76 | virtual void SetLevel(int line, int level)=0; 77 | virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0; 78 | virtual void IndicatorFill(int start, int end, int indicator, int value)=0; 79 | }; 80 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldFontQuality.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file FontQuality.h 3 | ** Definitions to control font anti-aliasing. 4 | **/ 5 | // Copyright 1998-2009 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #define SC_EFF_QUALITY_MASK 0xF 9 | #define SC_EFF_QUALITY_DEFAULT 0 10 | #define SC_EFF_QUALITY_NON_ANTIALIASED 1 11 | #define SC_EFF_QUALITY_ANTIALIASED 2 12 | #define SC_EFF_QUALITY_LCD_OPTIMIZED 3 13 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldKeyWords.cxx: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file KeyWords.cxx 3 | ** Colourise for particular languages. 4 | **/ 5 | // Copyright 1998-2002 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #define SCI_NAMESPACE 15 | 16 | #include "OldPlatform.h" 17 | 18 | #include "OldPropSet.h" 19 | #include "OldAccessor.h" 20 | #include "OldKeyWords.h" 21 | #include "OldScintilla.h" 22 | #include "OldSciLexer.h" 23 | 24 | #ifdef SCI_NAMESPACE 25 | using namespace Scintilla; 26 | #endif 27 | 28 | /** 29 | * Creates an array that points into each word in the string and puts \0 terminators 30 | * after each word. 31 | */ 32 | static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = false) { 33 | int prev = '\n'; 34 | int words = 0; 35 | // For rapid determination of whether a character is a separator, build 36 | // a look up table. 37 | bool wordSeparator[256]; 38 | for (int i=0; i<256; i++) { 39 | wordSeparator[i] = false; 40 | } 41 | wordSeparator['\r'] = true; 42 | wordSeparator['\n'] = true; 43 | if (!onlyLineEnds) { 44 | wordSeparator[' '] = true; 45 | wordSeparator['\t'] = true; 46 | } 47 | for (int j = 0; wordlist[j]; j++) { 48 | int curr = static_cast(wordlist[j]); 49 | if (!wordSeparator[curr] && wordSeparator[prev]) 50 | words++; 51 | prev = curr; 52 | } 53 | char **keywords = new char *[words + 1]; 54 | if (keywords) { 55 | words = 0; 56 | prev = '\0'; 57 | size_t slen = strlen(wordlist); 58 | for (size_t k = 0; k < slen; k++) { 59 | if (!wordSeparator[static_cast(wordlist[k])]) { 60 | if (!prev) { 61 | keywords[words] = &wordlist[k]; 62 | words++; 63 | } 64 | } else { 65 | wordlist[k] = '\0'; 66 | } 67 | prev = wordlist[k]; 68 | } 69 | keywords[words] = &wordlist[slen]; 70 | *len = words; 71 | } else { 72 | *len = 0; 73 | } 74 | return keywords; 75 | } 76 | 77 | void WordList::Clear() { 78 | if (words) { 79 | delete []list; 80 | delete []words; 81 | } 82 | words = 0; 83 | list = 0; 84 | len = 0; 85 | sorted = false; 86 | } 87 | 88 | void WordList::Set(const char *s) { 89 | list = new char[strlen(s) + 1]; 90 | strcpy(list, s); 91 | sorted = false; 92 | words = ArrayFromWordList(list, &len, onlyLineEnds); 93 | } 94 | 95 | int cmpString(const void *a1, const void *a2) { 96 | // Can't work out the correct incantation to use modern casts here 97 | return strcmp(*(char **)(a1), *(char **)(a2)); 98 | } 99 | 100 | static void SortWordList(char **words, unsigned int len) { 101 | qsort(reinterpret_cast(words), len, sizeof(*words), 102 | cmpString); 103 | } 104 | 105 | bool WordList::InList(const char *s) { 106 | if (0 == words) 107 | return false; 108 | if (!sorted) { 109 | sorted = true; 110 | SortWordList(words, len); 111 | for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++) 112 | starts[k] = -1; 113 | for (int l = len - 1; l >= 0; l--) { 114 | unsigned char indexChar = words[l][0]; 115 | starts[indexChar] = l; 116 | } 117 | } 118 | unsigned char firstChar = s[0]; 119 | int j = starts[firstChar]; 120 | if (j >= 0) { 121 | while ((unsigned char)words[j][0] == firstChar) { 122 | if (s[1] == words[j][1]) { 123 | const char *a = words[j] + 1; 124 | const char *b = s + 1; 125 | while (*a && *a == *b) { 126 | a++; 127 | b++; 128 | } 129 | if (!*a && !*b) 130 | return true; 131 | } 132 | j++; 133 | } 134 | } 135 | j = starts['^']; 136 | if (j >= 0) { 137 | while (words[j][0] == '^') { 138 | const char *a = words[j] + 1; 139 | const char *b = s; 140 | while (*a && *a == *b) { 141 | a++; 142 | b++; 143 | } 144 | if (!*a) 145 | return true; 146 | j++; 147 | } 148 | } 149 | return false; 150 | } 151 | 152 | /** similar to InList, but word s can be a substring of keyword. 153 | * eg. the keyword define is defined as def~ine. This means the word must start 154 | * with def to be a keyword, but also defi, defin and define are valid. 155 | * The marker is ~ in this case. 156 | */ 157 | bool WordList::InListAbbreviated(const char *s, const char marker) { 158 | if (0 == words) 159 | return false; 160 | if (!sorted) { 161 | sorted = true; 162 | SortWordList(words, len); 163 | for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++) 164 | starts[k] = -1; 165 | for (int l = len - 1; l >= 0; l--) { 166 | unsigned char indexChar = words[l][0]; 167 | starts[indexChar] = l; 168 | } 169 | } 170 | unsigned char firstChar = s[0]; 171 | int j = starts[firstChar]; 172 | if (j >= 0) { 173 | while (words[j][0] == firstChar) { 174 | bool isSubword = false; 175 | int start = 1; 176 | if (words[j][1] == marker) { 177 | isSubword = true; 178 | start++; 179 | } 180 | if (s[1] == words[j][start]) { 181 | const char *a = words[j] + start; 182 | const char *b = s + 1; 183 | while (*a && *a == *b) { 184 | a++; 185 | if (*a == marker) { 186 | isSubword = true; 187 | a++; 188 | } 189 | b++; 190 | } 191 | if ((!*a || isSubword) && !*b) 192 | return true; 193 | } 194 | j++; 195 | } 196 | } 197 | j = starts['^']; 198 | if (j >= 0) { 199 | while (words[j][0] == '^') { 200 | const char *a = words[j] + 1; 201 | const char *b = s; 202 | while (*a && *a == *b) { 203 | a++; 204 | b++; 205 | } 206 | if (!*a) 207 | return true; 208 | j++; 209 | } 210 | } 211 | return false; 212 | } 213 | 214 | const LexerModule *LexerModule::base = 0; 215 | int LexerModule::nextLanguage = SCLEX_AUTOMATIC+1; 216 | 217 | LexerModule::LexerModule(int language_, 218 | LexerFunction fnLexer_, 219 | const char *languageName_, 220 | LexerFunction fnFolder_, 221 | const char *const wordListDescriptions_[], 222 | int styleBits_) : 223 | language(language_), 224 | fnLexer(fnLexer_), 225 | fnFolder(fnFolder_), 226 | wordListDescriptions(wordListDescriptions_), 227 | styleBits(styleBits_), 228 | languageName(languageName_) { 229 | next = base; 230 | base = this; 231 | if (language == SCLEX_AUTOMATIC) { 232 | language = nextLanguage; 233 | nextLanguage++; 234 | } 235 | } 236 | 237 | int LexerModule::GetNumWordLists() const { 238 | if (wordListDescriptions == NULL) { 239 | return -1; 240 | } else { 241 | int numWordLists = 0; 242 | 243 | while (wordListDescriptions[numWordLists]) { 244 | ++numWordLists; 245 | } 246 | 247 | return numWordLists; 248 | } 249 | } 250 | 251 | const char *LexerModule::GetWordListDescription(int index) const { 252 | static const char *emptyStr = ""; 253 | 254 | PLATFORM_ASSERT(index < GetNumWordLists()); 255 | if (index >= GetNumWordLists()) { 256 | return emptyStr; 257 | } else { 258 | return wordListDescriptions[index]; 259 | } 260 | } 261 | 262 | int LexerModule::GetStyleBitsNeeded() const { 263 | return styleBits; 264 | } 265 | 266 | const LexerModule *LexerModule::Find(int language) { 267 | const LexerModule *lm = base; 268 | while (lm) { 269 | if (lm->language == language) { 270 | return lm; 271 | } 272 | lm = lm->next; 273 | } 274 | return 0; 275 | } 276 | 277 | const LexerModule *LexerModule::Find(const char *languageName) { 278 | if (languageName) { 279 | const LexerModule *lm = base; 280 | while (lm) { 281 | if (lm->languageName && 0 == strcmp(lm->languageName, languageName)) { 282 | return lm; 283 | } 284 | lm = lm->next; 285 | } 286 | } 287 | return 0; 288 | } 289 | 290 | void LexerModule::Lex(unsigned int startPos, int lengthDoc, int initStyle, 291 | WordList *keywordlists[], Accessor &styler) const { 292 | if (fnLexer) 293 | fnLexer(startPos, lengthDoc, initStyle, keywordlists, styler); 294 | } 295 | 296 | void LexerModule::Fold(unsigned int startPos, int lengthDoc, int initStyle, 297 | WordList *keywordlists[], Accessor &styler) const { 298 | if (fnFolder) { 299 | int lineCurrent = styler.GetLine(startPos); 300 | // Move back one line in case deletion wrecked current line fold state 301 | if (lineCurrent > 0) { 302 | lineCurrent--; 303 | int newStartPos = styler.LineStart(lineCurrent); 304 | lengthDoc += startPos - newStartPos; 305 | startPos = newStartPos; 306 | initStyle = 0; 307 | if (startPos > 0) { 308 | initStyle = styler.StyleAt(startPos - 1); 309 | } 310 | } 311 | fnFolder(startPos, lengthDoc, initStyle, keywordlists, styler); 312 | } 313 | } 314 | 315 | // Alternative historical name for Scintilla_LinkLexers 316 | int wxForceScintillaLexers(void) { 317 | return Scintilla_LinkLexers(); 318 | } 319 | 320 | // To add or remove a lexer, add or remove its file and run LexGen.py. 321 | 322 | // Force a reference to all of the Scintilla lexers so that the linker will 323 | // not remove the code of the lexers. 324 | int Scintilla_LinkLexers() { 325 | static int forcer = 0; 326 | 327 | // Shorten the code that declares a lexer and ensures it is linked in by calling a method. 328 | #define LINK_LEXER(lexer) extern LexerModule lexer; forcer += lexer.GetLanguage(); 329 | 330 | //++Autogenerated -- run src/LexGen.py to regenerate 331 | //**\(\tLINK_LEXER(\*);\n\) 332 | //--Autogenerated -- end of automatically generated section 333 | 334 | return 1; 335 | } 336 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldKeyWords.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file KeyWords.h 3 | ** Colourise for particular languages. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifdef SCI_NAMESPACE 9 | namespace Scintilla { 10 | #endif 11 | 12 | /** 13 | */ 14 | class WordList { 15 | public: 16 | // Each word contains at least one character - a empty word acts as sentinel at the end. 17 | char **words; 18 | char *list; 19 | int len; 20 | bool onlyLineEnds; ///< Delimited by any white space or only line ends 21 | bool sorted; 22 | int starts[256]; 23 | WordList(bool onlyLineEnds_ = false) : 24 | words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), 25 | sorted(false) 26 | {} 27 | ~WordList() { Clear(); } 28 | operator bool() { return len ? true : false; } 29 | void Clear(); 30 | void Set(const char *s); 31 | bool InList(const char *s); 32 | bool InListAbbreviated(const char *s, const char marker); 33 | }; 34 | 35 | typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle, 36 | WordList *keywordlists[], Accessor &styler); 37 | 38 | /** 39 | * A LexerModule is responsible for lexing and folding a particular language. 40 | * The class maintains a list of LexerModules which can be searched to find a 41 | * module appropriate to a particular language. 42 | */ 43 | class LexerModule { 44 | protected: 45 | const LexerModule *next; 46 | int language; 47 | LexerFunction fnLexer; 48 | LexerFunction fnFolder; 49 | const char * const * wordListDescriptions; 50 | int styleBits; 51 | 52 | static const LexerModule *base; 53 | static int nextLanguage; 54 | 55 | public: 56 | const char *languageName; 57 | LexerModule(int language_, 58 | LexerFunction fnLexer_, 59 | const char *languageName_=0, 60 | LexerFunction fnFolder_=0, 61 | const char * const wordListDescriptions_[] = NULL, 62 | int styleBits_=5); 63 | virtual ~LexerModule() { 64 | } 65 | int GetLanguage() const { return language; } 66 | 67 | // -1 is returned if no WordList information is available 68 | int GetNumWordLists() const; 69 | const char *GetWordListDescription(int index) const; 70 | 71 | int GetStyleBitsNeeded() const; 72 | 73 | virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, 74 | WordList *keywordlists[], Accessor &styler) const; 75 | virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle, 76 | WordList *keywordlists[], Accessor &styler) const; 77 | static const LexerModule *Find(int language); 78 | static const LexerModule *Find(const char *languageName); 79 | }; 80 | 81 | #ifdef SCI_NAMESPACE 82 | } 83 | #endif 84 | 85 | /** 86 | * Check if a character is a space. 87 | * This is ASCII specific but is safe with chars >= 0x80. 88 | */ 89 | inline bool isspacechar(unsigned char ch) { 90 | return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); 91 | } 92 | 93 | inline bool iswordchar(char ch) { 94 | return isascii(ch) && (isalnum(ch) || ch == '.' || ch == '_'); 95 | } 96 | 97 | inline bool iswordstart(char ch) { 98 | return isascii(ch) && (isalnum(ch) || ch == '_'); 99 | } 100 | 101 | inline bool isoperator(char ch) { 102 | if (isascii(ch) && isalnum(ch)) 103 | return false; 104 | // '.' left out as it is used to make up numbers 105 | if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || 106 | ch == '(' || ch == ')' || ch == '-' || ch == '+' || 107 | ch == '=' || ch == '|' || ch == '{' || ch == '}' || 108 | ch == '[' || ch == ']' || ch == ':' || ch == ';' || 109 | ch == '<' || ch == '>' || ch == ',' || ch == '/' || 110 | ch == '?' || ch == '!' || ch == '.' || ch == '~') 111 | return true; 112 | return false; 113 | } 114 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldPlatform.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Platform.h 3 | ** Interface to platform facilities. Also includes some basic utilities. 4 | ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows. 5 | **/ 6 | // Copyright 1998-2009 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #ifndef PLATFORM_H 10 | #define PLATFORM_H 11 | 12 | // PLAT_GTK = GTK+ on Linux or Win32 13 | // PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 14 | // PLAT_WIN = Win32 API on Win32 OS 15 | // PLAT_WX is wxWindows on any supported platform 16 | 17 | #define PLAT_GTK 0 18 | #define PLAT_GTK_WIN32 0 19 | #define PLAT_MACOSX 0 20 | #define PLAT_WIN 0 21 | #define PLAT_WX 0 22 | #define PLAT_FOX 0 23 | 24 | #if defined(FOX) 25 | #undef PLAT_FOX 26 | #define PLAT_FOX 1 27 | 28 | #elif defined(__WX__) 29 | #undef PLAT_WX 30 | #define PLAT_WX 1 31 | 32 | #elif defined(GTK) 33 | #undef PLAT_GTK 34 | #define PLAT_GTK 1 35 | 36 | #if defined(__WIN32__) || defined(_MSC_VER) 37 | #undef PLAT_GTK_WIN32 38 | #define PLAT_GTK_WIN32 1 39 | #endif 40 | 41 | #elif defined(__APPLE__) 42 | 43 | #undef PLAT_MACOSX 44 | #define PLAT_MACOSX 1 45 | 46 | #else 47 | #undef PLAT_WIN 48 | #define PLAT_WIN 1 49 | 50 | #endif 51 | 52 | #ifdef SCI_NAMESPACE 53 | namespace Scintilla { 54 | #endif 55 | 56 | // Underlying the implementation of the platform classes are platform specific types. 57 | // Sometimes these need to be passed around by client code so they are defined here 58 | 59 | typedef void *FontID; 60 | typedef void *SurfaceID; 61 | typedef void *WindowID; 62 | typedef void *MenuID; 63 | typedef void *TickerID; 64 | typedef void *Function; 65 | typedef void *IdlerID; 66 | 67 | /** 68 | * A geometric point class. 69 | * Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably. 70 | */ 71 | class Point { 72 | public: 73 | int x; 74 | int y; 75 | 76 | explicit Point(int x_=0, int y_=0) : x(x_), y(y_) { 77 | } 78 | 79 | // Other automatically defined methods (assignment, copy constructor, destructor) are fine 80 | 81 | static Point FromLong(long lpoint); 82 | }; 83 | 84 | /** 85 | * A geometric rectangle class. 86 | * PRectangle is exactly the same as the Win32 RECT so can be used interchangeably. 87 | * PRectangles contain their top and left sides, but not their right and bottom sides. 88 | */ 89 | class PRectangle { 90 | public: 91 | int left; 92 | int top; 93 | int right; 94 | int bottom; 95 | 96 | PRectangle(int left_=0, int top_=0, int right_=0, int bottom_ = 0) : 97 | left(left_), top(top_), right(right_), bottom(bottom_) { 98 | } 99 | 100 | // Other automatically defined methods (assignment, copy constructor, destructor) are fine 101 | 102 | bool operator==(PRectangle &rc) { 103 | return (rc.left == left) && (rc.right == right) && 104 | (rc.top == top) && (rc.bottom == bottom); 105 | } 106 | bool Contains(Point pt) { 107 | return (pt.x >= left) && (pt.x <= right) && 108 | (pt.y >= top) && (pt.y <= bottom); 109 | } 110 | bool Contains(PRectangle rc) { 111 | return (rc.left >= left) && (rc.right <= right) && 112 | (rc.top >= top) && (rc.bottom <= bottom); 113 | } 114 | bool Intersects(PRectangle other) { 115 | return (right > other.left) && (left < other.right) && 116 | (bottom > other.top) && (top < other.bottom); 117 | } 118 | void Move(int xDelta, int yDelta) { 119 | left += xDelta; 120 | top += yDelta; 121 | right += xDelta; 122 | bottom += yDelta; 123 | } 124 | int Width() { return right - left; } 125 | int Height() { return bottom - top; } 126 | bool Empty() { 127 | return (Height() <= 0) || (Width() <= 0); 128 | } 129 | }; 130 | 131 | /** 132 | * In some circumstances, including Win32 in paletted mode and GTK+, each colour 133 | * must be allocated before use. The desired colours are held in the ColourDesired class, 134 | * and after allocation the allocation entry is stored in the ColourAllocated class. In other 135 | * circumstances, such as Win32 in true colour mode, the allocation process just copies 136 | * the RGB values from the desired to the allocated class. 137 | * As each desired colour requires allocation before it can be used, the ColourPair class 138 | * holds both a ColourDesired and a ColourAllocated 139 | * The Palette class is responsible for managing the palette of colours which contains a 140 | * list of ColourPair objects and performs the allocation. 141 | */ 142 | 143 | /** 144 | * Holds a desired RGB colour. 145 | */ 146 | class ColourDesired { 147 | long co; 148 | public: 149 | ColourDesired(long lcol=0) { 150 | co = lcol; 151 | } 152 | 153 | ColourDesired(unsigned int red, unsigned int green, unsigned int blue) { 154 | Set(red, green, blue); 155 | } 156 | 157 | bool operator==(const ColourDesired &other) const { 158 | return co == other.co; 159 | } 160 | 161 | void Set(long lcol) { 162 | co = lcol; 163 | } 164 | 165 | void Set(unsigned int red, unsigned int green, unsigned int blue) { 166 | co = red | (green << 8) | (blue << 16); 167 | } 168 | 169 | static inline unsigned int ValueOfHex(const char ch) { 170 | if (ch >= '0' && ch <= '9') 171 | return ch - '0'; 172 | else if (ch >= 'A' && ch <= 'F') 173 | return ch - 'A' + 10; 174 | else if (ch >= 'a' && ch <= 'f') 175 | return ch - 'a' + 10; 176 | else 177 | return 0; 178 | } 179 | 180 | void Set(const char *val) { 181 | if (*val == '#') { 182 | val++; 183 | } 184 | unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]); 185 | unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]); 186 | unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]); 187 | Set(r, g, b); 188 | } 189 | 190 | long AsLong() const { 191 | return co; 192 | } 193 | 194 | unsigned int GetRed() { 195 | return co & 0xff; 196 | } 197 | 198 | unsigned int GetGreen() { 199 | return (co >> 8) & 0xff; 200 | } 201 | 202 | unsigned int GetBlue() { 203 | return (co >> 16) & 0xff; 204 | } 205 | }; 206 | 207 | /** 208 | * Holds an allocated RGB colour which may be an approximation to the desired colour. 209 | */ 210 | class ColourAllocated { 211 | long coAllocated; 212 | 213 | public: 214 | 215 | ColourAllocated(long lcol=0) { 216 | coAllocated = lcol; 217 | } 218 | 219 | void Set(long lcol) { 220 | coAllocated = lcol; 221 | } 222 | 223 | long AsLong() const { 224 | return coAllocated; 225 | } 226 | }; 227 | 228 | /** 229 | * Colour pairs hold a desired colour and an allocated colour. 230 | */ 231 | struct ColourPair { 232 | ColourDesired desired; 233 | ColourAllocated allocated; 234 | 235 | ColourPair(ColourDesired desired_=ColourDesired(0,0,0)) { 236 | desired = desired_; 237 | allocated.Set(desired.AsLong()); 238 | } 239 | void Copy() { 240 | allocated.Set(desired.AsLong()); 241 | } 242 | }; 243 | 244 | class Window; // Forward declaration for Palette 245 | 246 | /** 247 | * Colour palette management. 248 | */ 249 | class Palette { 250 | int used; 251 | int size; 252 | ColourPair *entries; 253 | #if PLAT_GTK 254 | void *allocatedPalette; // GdkColor * 255 | int allocatedLen; 256 | #endif 257 | // Private so Palette objects can not be copied 258 | Palette(const Palette &) {} 259 | Palette &operator=(const Palette &) { return *this; } 260 | public: 261 | #if PLAT_WIN 262 | void *hpal; 263 | #endif 264 | bool allowRealization; 265 | 266 | Palette(); 267 | ~Palette(); 268 | 269 | void Release(); 270 | 271 | /** 272 | * This method either adds a colour to the list of wanted colours (want==true) 273 | * or retrieves the allocated colour back to the ColourPair. 274 | * This is one method to make it easier to keep the code for wanting and retrieving in sync. 275 | */ 276 | void WantFind(ColourPair &cp, bool want); 277 | 278 | void Allocate(Window &w); 279 | }; 280 | 281 | /** 282 | * Font management. 283 | */ 284 | class Font { 285 | protected: 286 | FontID fid; 287 | #if PLAT_WX 288 | int ascent; 289 | #endif 290 | // Private so Font objects can not be copied 291 | Font(const Font &) {} 292 | Font &operator=(const Font &) { fid=0; return *this; } 293 | public: 294 | Font(); 295 | virtual ~Font(); 296 | 297 | virtual void Create(const char *faceName, int characterSet, int size, 298 | bool bold, bool italic, int extraFontFlag=0); 299 | virtual void Release(); 300 | 301 | FontID GetID() { return fid; } 302 | // Alias another font - caller guarantees not to Release 303 | void SetID(FontID fid_) { fid = fid_; } 304 | friend class Surface; 305 | friend class SurfaceImpl; 306 | }; 307 | 308 | /** 309 | * A surface abstracts a place to draw. 310 | */ 311 | class Surface { 312 | private: 313 | // Private so Surface objects can not be copied 314 | Surface(const Surface &) {} 315 | Surface &operator=(const Surface &) { return *this; } 316 | public: 317 | Surface() {} 318 | virtual ~Surface() {} 319 | static Surface *Allocate(); 320 | 321 | virtual void Init(WindowID wid)=0; 322 | virtual void Init(SurfaceID sid, WindowID wid)=0; 323 | virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; 324 | 325 | virtual void Release()=0; 326 | virtual bool Initialised()=0; 327 | virtual void PenColour(ColourAllocated fore)=0; 328 | virtual int LogPixelsY()=0; 329 | virtual int DeviceHeightFont(int points)=0; 330 | virtual void MoveTo(int x_, int y_)=0; 331 | virtual void LineTo(int x_, int y_)=0; 332 | virtual void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back)=0; 333 | virtual void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; 334 | virtual void FillRectangle(PRectangle rc, ColourAllocated back)=0; 335 | virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0; 336 | virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; 337 | virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, 338 | ColourAllocated outline, int alphaOutline, int flags)=0; 339 | virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; 340 | virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; 341 | 342 | virtual void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; 343 | virtual void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; 344 | virtual void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore)=0; 345 | virtual void MeasureWidths(Font &font_, const char *s, int len, int *positions)=0; 346 | virtual int WidthText(Font &font_, const char *s, int len)=0; 347 | virtual int WidthChar(Font &font_, char ch)=0; 348 | virtual int Ascent(Font &font_)=0; 349 | virtual int Descent(Font &font_)=0; 350 | virtual int InternalLeading(Font &font_)=0; 351 | virtual int ExternalLeading(Font &font_)=0; 352 | virtual int Height(Font &font_)=0; 353 | virtual int AverageCharWidth(Font &font_)=0; 354 | 355 | virtual int SetPalette(Palette *pal, bool inBackGround)=0; 356 | virtual void SetClip(PRectangle rc)=0; 357 | virtual void FlushCachedState()=0; 358 | 359 | virtual void SetUnicodeMode(bool unicodeMode_)=0; 360 | virtual void SetDBCSMode(int codePage)=0; 361 | }; 362 | 363 | /** 364 | * A simple callback action passing one piece of untyped user data. 365 | */ 366 | typedef void (*CallBackAction)(void*); 367 | 368 | /** 369 | * Class to hide the details of window manipulation. 370 | * Does not own the window which will normally have a longer life than this object. 371 | */ 372 | class Window { 373 | protected: 374 | WindowID wid; 375 | #if PLAT_MACOSX 376 | void *windowRef; 377 | void *control; 378 | #endif 379 | public: 380 | Window() : wid(0), cursorLast(cursorInvalid) { 381 | #if PLAT_MACOSX 382 | windowRef = 0; 383 | control = 0; 384 | #endif 385 | } 386 | Window(const Window &source) : wid(source.wid), cursorLast(cursorInvalid) { 387 | #if PLAT_MACOSX 388 | windowRef = 0; 389 | control = 0; 390 | #endif 391 | } 392 | virtual ~Window(); 393 | Window &operator=(WindowID wid_) { 394 | wid = wid_; 395 | return *this; 396 | } 397 | WindowID GetID() const { return wid; } 398 | bool Created() const { return wid != 0; } 399 | void Destroy(); 400 | bool HasFocus(); 401 | PRectangle GetPosition(); 402 | void SetPosition(PRectangle rc); 403 | void SetPositionRelative(PRectangle rc, Window relativeTo); 404 | PRectangle GetClientPosition(); 405 | void Show(bool show=true); 406 | void InvalidateAll(); 407 | void InvalidateRectangle(PRectangle rc); 408 | virtual void SetFont(Font &font); 409 | enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; 410 | void SetCursor(Cursor curs); 411 | void SetTitle(const char *s); 412 | PRectangle GetMonitorRect(Point pt); 413 | #if PLAT_MACOSX 414 | void SetWindow(void *ref) { windowRef = ref; }; 415 | void SetControl(void *_control) { control = _control; }; 416 | #endif 417 | private: 418 | Cursor cursorLast; 419 | }; 420 | 421 | /** 422 | * Listbox management. 423 | */ 424 | 425 | class ListBox : public Window { 426 | public: 427 | ListBox(); 428 | virtual ~ListBox(); 429 | static ListBox *Allocate(); 430 | 431 | virtual void SetFont(Font &font)=0; 432 | virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_)=0; 433 | virtual void SetAverageCharWidth(int width)=0; 434 | virtual void SetVisibleRows(int rows)=0; 435 | virtual int GetVisibleRows() const=0; 436 | virtual PRectangle GetDesiredRect()=0; 437 | virtual int CaretFromEdge()=0; 438 | virtual void Clear()=0; 439 | virtual void Append(char *s, int type = -1)=0; 440 | virtual int Length()=0; 441 | virtual void Select(int n)=0; 442 | virtual int GetSelection()=0; 443 | virtual int Find(const char *prefix)=0; 444 | virtual void GetValue(int n, char *value, int len)=0; 445 | virtual void RegisterImage(int type, const char *xpm_data)=0; 446 | virtual void ClearRegisteredImages()=0; 447 | virtual void SetDoubleClickAction(CallBackAction, void *)=0; 448 | virtual void SetList(const char* list, char separator, char typesep)=0; 449 | }; 450 | 451 | /** 452 | * Menu management. 453 | */ 454 | class Menu { 455 | MenuID mid; 456 | public: 457 | Menu(); 458 | MenuID GetID() { return mid; } 459 | void CreatePopUp(); 460 | void Destroy(); 461 | void Show(Point pt, Window &w); 462 | }; 463 | 464 | class ElapsedTime { 465 | long bigBit; 466 | long littleBit; 467 | public: 468 | ElapsedTime(); 469 | double Duration(bool reset=false); 470 | }; 471 | 472 | /** 473 | * Dynamic Library (DLL/SO/...) loading 474 | */ 475 | class DynamicLibrary { 476 | public: 477 | virtual ~DynamicLibrary() {} 478 | 479 | /// @return Pointer to function "name", or NULL on failure. 480 | virtual Function FindFunction(const char *name) = 0; 481 | 482 | /// @return true if the library was loaded successfully. 483 | virtual bool IsValid() = 0; 484 | 485 | /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. 486 | static DynamicLibrary *Load(const char *modulePath); 487 | }; 488 | 489 | /** 490 | * Platform class used to retrieve system wide parameters such as double click speed 491 | * and chrome colour. Not a creatable object, more of a module with several functions. 492 | */ 493 | class Platform { 494 | // Private so Platform objects can not be copied 495 | Platform(const Platform &) {} 496 | Platform &operator=(const Platform &) { return *this; } 497 | public: 498 | // Should be private because no new Platforms are ever created 499 | // but gcc warns about this 500 | Platform() {} 501 | ~Platform() {} 502 | static ColourDesired Chrome(); 503 | static ColourDesired ChromeHighlight(); 504 | static const char *DefaultFont(); 505 | static int DefaultFontSize(); 506 | static unsigned int DoubleClickTime(); 507 | static bool MouseButtonBounce(); 508 | static void DebugDisplay(const char *s); 509 | static bool IsKeyDown(int key); 510 | static long SendScintilla( 511 | WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0); 512 | static long SendScintillaPointer( 513 | WindowID w, unsigned int msg, unsigned long wParam=0, void *lParam=0); 514 | static bool IsDBCSLeadByte(int codePage, char ch); 515 | static int DBCSCharLength(int codePage, const char *s); 516 | static int DBCSCharMaxLength(); 517 | 518 | // These are utility functions not really tied to a platform 519 | static int Minimum(int a, int b); 520 | static int Maximum(int a, int b); 521 | // Next three assume 16 bit shorts and 32 bit longs 522 | static long LongFromTwoShorts(short a,short b) { 523 | return (a) | ((b) << 16); 524 | } 525 | static short HighShortFromLong(long x) { 526 | return static_cast(x >> 16); 527 | } 528 | static short LowShortFromLong(long x) { 529 | return static_cast(x & 0xffff); 530 | } 531 | static void DebugPrintf(const char *format, ...); 532 | static bool ShowAssertionPopUps(bool assertionPopUps_); 533 | static void Assert(const char *c, const char *file, int line); 534 | static int Clamp(int val, int minVal, int maxVal); 535 | }; 536 | 537 | #ifdef NDEBUG 538 | #define PLATFORM_ASSERT(c) ((void)0) 539 | #else 540 | #ifdef SCI_NAMESPACE 541 | #define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Platform::Assert(#c, __FILE__, __LINE__)) 542 | #else 543 | #define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__)) 544 | #endif 545 | #endif 546 | 547 | #ifdef SCI_NAMESPACE 548 | } 549 | #endif 550 | 551 | // Shut up annoying Visual C++ warnings: 552 | #ifdef _MSC_VER 553 | #pragma warning(disable: 4244 4309 4514 4710) 554 | #endif 555 | 556 | #endif 557 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldPlatformRes.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file PlatformRes.h 3 | ** Defines IDs of resources used by Scintilla on Windows platform. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #define IDC_MARGIN 400 9 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldPropSet.cxx: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file PropSet.cxx 3 | ** A Java style properties file module. 4 | **/ 5 | // Copyright 1998-2003 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | // Maintain a dictionary of properties 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #ifdef _MSC_VER 15 | // Visual C++ doesn't like unreachable code or long decorated names in its own headers. 16 | #pragma warning(disable: 4018 4100 4245 4511 4512 4663 4702 4786) 17 | #endif 18 | 19 | #include 20 | #include 21 | 22 | #define SCI_NAMESPACE 23 | 24 | #include "OldPlatform.h" 25 | 26 | #include "OldPropSet.h" 27 | #include "OldPropSetSimple.h" 28 | 29 | #ifdef SCI_NAMESPACE 30 | using namespace Scintilla; 31 | #endif 32 | 33 | typedef std::map mapss; 34 | 35 | PropSetSimple::PropSetSimple() { 36 | mapss *props = new mapss; 37 | impl = static_cast(props); 38 | } 39 | 40 | PropSetSimple::~PropSetSimple() { 41 | mapss *props = static_cast(impl); 42 | delete props; 43 | impl = 0; 44 | } 45 | 46 | void PropSetSimple::Set(const char *key, const char *val, int lenKey, int lenVal) { 47 | mapss *props = static_cast(impl); 48 | if (!*key) // Empty keys are not supported 49 | return; 50 | if (lenKey == -1) 51 | lenKey = static_cast(strlen(key)); 52 | if (lenVal == -1) 53 | lenVal = static_cast(strlen(val)); 54 | (*props)[std::string(key, lenKey)] = std::string(val, lenVal); 55 | } 56 | 57 | static bool IsASpaceCharacter(unsigned int ch) { 58 | return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); 59 | } 60 | 61 | void PropSetSimple::Set(const char *keyVal) { 62 | while (IsASpaceCharacter(*keyVal)) 63 | keyVal++; 64 | const char *endVal = keyVal; 65 | while (*endVal && (*endVal != '\n')) 66 | endVal++; 67 | const char *eqAt = strchr(keyVal, '='); 68 | if (eqAt) { 69 | Set(keyVal, eqAt + 1, eqAt-keyVal, endVal - eqAt - 1); 70 | } else if (*keyVal) { // No '=' so assume '=1' 71 | Set(keyVal, "1", endVal-keyVal, 1); 72 | } 73 | } 74 | 75 | void PropSetSimple::SetMultiple(const char *s) { 76 | const char *eol = strchr(s, '\n'); 77 | while (eol) { 78 | Set(s); 79 | s = eol + 1; 80 | eol = strchr(s, '\n'); 81 | } 82 | Set(s); 83 | } 84 | 85 | const char *PropSetSimple::Get(const char *key) const { 86 | mapss *props = static_cast(impl); 87 | mapss::const_iterator keyPos = props->find(std::string(key)); 88 | if (keyPos != props->end()) { 89 | return keyPos->second.c_str(); 90 | } else { 91 | return ""; 92 | } 93 | } 94 | 95 | // There is some inconsistency between GetExpanded("foo") and Expand("$(foo)"). 96 | // A solution is to keep a stack of variables that have been expanded, so that 97 | // recursive expansions can be skipped. For now I'll just use the C++ stack 98 | // for that, through a recursive function and a simple chain of pointers. 99 | 100 | struct VarChain { 101 | VarChain(const char *var_=NULL, const VarChain *link_=NULL): var(var_), link(link_) {} 102 | 103 | bool contains(const char *testVar) const { 104 | return (var && (0 == strcmp(var, testVar))) 105 | || (link && link->contains(testVar)); 106 | } 107 | 108 | const char *var; 109 | const VarChain *link; 110 | }; 111 | 112 | static int ExpandAllInPlace(const PropSetSimple &props, std::string &withVars, int maxExpands, const VarChain &blankVars) { 113 | size_t varStart = withVars.find("$("); 114 | while ((varStart != std::string::npos) && (maxExpands > 0)) { 115 | size_t varEnd = withVars.find(")", varStart+2); 116 | if (varEnd == std::string::npos) { 117 | break; 118 | } 119 | 120 | // For consistency, when we see '$(ab$(cde))', expand the inner variable first, 121 | // regardless whether there is actually a degenerate variable named 'ab$(cde'. 122 | size_t innerVarStart = withVars.find("$(", varStart+2); 123 | while ((innerVarStart != std::string::npos) && (innerVarStart > varStart) && (innerVarStart < varEnd)) { 124 | varStart = innerVarStart; 125 | innerVarStart = withVars.find("$(", varStart+2); 126 | } 127 | 128 | std::string var(withVars.c_str(), varStart + 2, varEnd - varStart - 2); 129 | std::string val = props.Get(var.c_str()); 130 | 131 | if (blankVars.contains(var.c_str())) { 132 | val = ""; // treat blankVar as an empty string (e.g. to block self-reference) 133 | } 134 | 135 | if (--maxExpands >= 0) { 136 | maxExpands = ExpandAllInPlace(props, val, maxExpands, VarChain(var.c_str(), &blankVars)); 137 | } 138 | 139 | withVars.erase(varStart, varEnd-varStart+1); 140 | withVars.insert(varStart, val.c_str(), val.length()); 141 | 142 | varStart = withVars.find("$("); 143 | } 144 | 145 | return maxExpands; 146 | } 147 | 148 | char *PropSetSimple::Expanded(const char *key) const { 149 | std::string val = Get(key); 150 | ExpandAllInPlace(*this, val, 100, VarChain(key)); 151 | char *ret = new char [val.size() + 1]; 152 | strcpy(ret, val.c_str()); 153 | return ret; 154 | } 155 | 156 | char *PropSetSimple::ToString() const { 157 | mapss *props = static_cast(impl); 158 | std::string sval; 159 | for (mapss::const_iterator it=props->begin(); it != props->end(); it++) { 160 | sval += it->first; 161 | sval += "="; 162 | sval += it->second; 163 | sval += "\n"; 164 | } 165 | char *ret = new char [sval.size() + 1]; 166 | strcpy(ret, sval.c_str()); 167 | return ret; 168 | } 169 | 170 | int PropSetSimple::GetInt(const char *key, int defaultValue) const { 171 | char *val = Expanded(key); 172 | if (val) { 173 | int retVal = val[0] ? atoi(val) : defaultValue; 174 | delete []val; 175 | return retVal; 176 | } 177 | return defaultValue; 178 | } 179 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldPropSet.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file PropSet.h 3 | ** An interface to the methods needed for access to property sets inside lexers. 4 | **/ 5 | // Copyright 1998-2009 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef PROPSET_H 9 | #define PROPSET_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | class PropertyGet { 16 | public: 17 | virtual char *ToString() const=0; // Caller must delete[] the return value 18 | virtual int GetInt(const char *key, int defaultValue=0) const=0; 19 | virtual ~PropertyGet() {} 20 | }; 21 | 22 | #ifdef SCI_NAMESPACE 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldPropSetSimple.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file PropSetSimple.h 3 | ** A basic string to string map. 4 | **/ 5 | // Copyright 1998-2009 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef PROPSETSIMPLE_H 9 | #define PROPSETSIMPLE_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | class PropSetSimple : public PropertyGet { 16 | void *impl; 17 | void Set(const char *keyVal); 18 | public: 19 | PropSetSimple(); 20 | virtual ~PropSetSimple(); 21 | void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1); 22 | void SetMultiple(const char *); 23 | const char *Get(const char *key) const; 24 | char *Expanded(const char *key) const; 25 | char *ToString() const; 26 | int GetInt(const char *key, int defaultValue=0) const; 27 | }; 28 | 29 | #ifdef SCI_NAMESPACE 30 | } 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldScintilla.h: -------------------------------------------------------------------------------- 1 | /* Scintilla source code edit control */ 2 | /** @file Scintilla.h 3 | ** Interface to the edit control. 4 | **/ 5 | /* Copyright 1998-2003 by Neil Hodgson 6 | * The License.txt file describes the conditions under which this software may be distributed. */ 7 | 8 | /* Most of this file is automatically generated from the Scintilla.iface interface definition 9 | * file which contains any comments about the definitions. HFacer.py does the generation. */ 10 | 11 | #ifndef SCINTILLA_H 12 | #define SCINTILLA_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #if defined(_WIN32) 19 | /* Return false on failure: */ 20 | int Scintilla_RegisterClasses(void *hInstance); 21 | int Scintilla_ReleaseResources(); 22 | #endif 23 | int Scintilla_LinkLexers(); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | /* Here should be placed typedefs for uptr_t, an unsigned integer type large enough to 30 | * hold a pointer and sptr_t, a signed integer large enough to hold a pointer. 31 | * May need to be changed for 64 bit platforms. */ 32 | #if defined(_WIN32) 33 | #include 34 | #endif 35 | #ifdef MAXULONG_PTR 36 | typedef ULONG_PTR uptr_t; 37 | typedef LONG_PTR sptr_t; 38 | #else 39 | typedef unsigned long uptr_t; 40 | typedef long sptr_t; 41 | #endif 42 | 43 | typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam); 44 | 45 | /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ 46 | #define INVALID_POSITION -1 47 | #define SCI_START 2000 48 | #define SCI_OPTIONAL_START 3000 49 | #define SCI_LEXER_START 4000 50 | #define SCI_ADDTEXT 2001 51 | #define SCI_ADDSTYLEDTEXT 2002 52 | #define SCI_INSERTTEXT 2003 53 | #define SCI_CLEARALL 2004 54 | #define SCI_CLEARDOCUMENTSTYLE 2005 55 | #define SCI_GETLENGTH 2006 56 | #define SCI_GETCHARAT 2007 57 | #define SCI_GETCURRENTPOS 2008 58 | #define SCI_GETANCHOR 2009 59 | #define SCI_GETSTYLEAT 2010 60 | #define SCI_REDO 2011 61 | #define SCI_SETUNDOCOLLECTION 2012 62 | #define SCI_SELECTALL 2013 63 | #define SCI_SETSAVEPOINT 2014 64 | #define SCI_GETSTYLEDTEXT 2015 65 | #define SCI_CANREDO 2016 66 | #define SCI_MARKERLINEFROMHANDLE 2017 67 | #define SCI_MARKERDELETEHANDLE 2018 68 | #define SCI_GETUNDOCOLLECTION 2019 69 | #define SCWS_INVISIBLE 0 70 | #define SCWS_VISIBLEALWAYS 1 71 | #define SCWS_VISIBLEAFTERINDENT 2 72 | #define SCI_GETVIEWWS 2020 73 | #define SCI_SETVIEWWS 2021 74 | #define SCI_POSITIONFROMPOINT 2022 75 | #define SCI_POSITIONFROMPOINTCLOSE 2023 76 | #define SCI_GOTOLINE 2024 77 | #define SCI_GOTOPOS 2025 78 | #define SCI_SETANCHOR 2026 79 | #define SCI_GETCURLINE 2027 80 | #define SCI_GETENDSTYLED 2028 81 | #define SC_EOL_CRLF 0 82 | #define SC_EOL_CR 1 83 | #define SC_EOL_LF 2 84 | #define SCI_CONVERTEOLS 2029 85 | #define SCI_GETEOLMODE 2030 86 | #define SCI_SETEOLMODE 2031 87 | #define SCI_STARTSTYLING 2032 88 | #define SCI_SETSTYLING 2033 89 | #define SCI_GETBUFFEREDDRAW 2034 90 | #define SCI_SETBUFFEREDDRAW 2035 91 | #define SCI_SETTABWIDTH 2036 92 | #define SCI_GETTABWIDTH 2121 93 | #define SC_CP_UTF8 65001 94 | #define SC_CP_DBCS 1 95 | #define SCI_SETCODEPAGE 2037 96 | #define SCI_SETUSEPALETTE 2039 97 | #define MARKER_MAX 31 98 | #define SC_MARK_CIRCLE 0 99 | #define SC_MARK_ROUNDRECT 1 100 | #define SC_MARK_ARROW 2 101 | #define SC_MARK_SMALLRECT 3 102 | #define SC_MARK_SHORTARROW 4 103 | #define SC_MARK_EMPTY 5 104 | #define SC_MARK_ARROWDOWN 6 105 | #define SC_MARK_MINUS 7 106 | #define SC_MARK_PLUS 8 107 | #define SC_MARK_VLINE 9 108 | #define SC_MARK_LCORNER 10 109 | #define SC_MARK_TCORNER 11 110 | #define SC_MARK_BOXPLUS 12 111 | #define SC_MARK_BOXPLUSCONNECTED 13 112 | #define SC_MARK_BOXMINUS 14 113 | #define SC_MARK_BOXMINUSCONNECTED 15 114 | #define SC_MARK_LCORNERCURVE 16 115 | #define SC_MARK_TCORNERCURVE 17 116 | #define SC_MARK_CIRCLEPLUS 18 117 | #define SC_MARK_CIRCLEPLUSCONNECTED 19 118 | #define SC_MARK_CIRCLEMINUS 20 119 | #define SC_MARK_CIRCLEMINUSCONNECTED 21 120 | #define SC_MARK_BACKGROUND 22 121 | #define SC_MARK_DOTDOTDOT 23 122 | #define SC_MARK_ARROWS 24 123 | #define SC_MARK_PIXMAP 25 124 | #define SC_MARK_FULLRECT 26 125 | #define SC_MARK_LEFTRECT 27 126 | #define SC_MARK_AVAILABLE 28 127 | #define SC_MARK_UNDERLINE 29 128 | #define SC_MARK_CHARACTER 10000 129 | #define SC_MARKNUM_FOLDEREND 25 130 | #define SC_MARKNUM_FOLDEROPENMID 26 131 | #define SC_MARKNUM_FOLDERMIDTAIL 27 132 | #define SC_MARKNUM_FOLDERTAIL 28 133 | #define SC_MARKNUM_FOLDERSUB 29 134 | #define SC_MARKNUM_FOLDER 30 135 | #define SC_MARKNUM_FOLDEROPEN 31 136 | #define SC_MASK_FOLDERS 0xFE000000 137 | #define SCI_MARKERDEFINE 2040 138 | #define SCI_MARKERSETFORE 2041 139 | #define SCI_MARKERSETBACK 2042 140 | #define SCI_MARKERADD 2043 141 | #define SCI_MARKERDELETE 2044 142 | #define SCI_MARKERDELETEALL 2045 143 | #define SCI_MARKERGET 2046 144 | #define SCI_MARKERNEXT 2047 145 | #define SCI_MARKERPREVIOUS 2048 146 | #define SCI_MARKERDEFINEPIXMAP 2049 147 | #define SCI_MARKERADDSET 2466 148 | #define SCI_MARKERSETALPHA 2476 149 | #define SC_MARGIN_SYMBOL 0 150 | #define SC_MARGIN_NUMBER 1 151 | #define SC_MARGIN_BACK 2 152 | #define SC_MARGIN_FORE 3 153 | #define SC_MARGIN_TEXT 4 154 | #define SC_MARGIN_RTEXT 5 155 | #define SCI_SETMARGINTYPEN 2240 156 | #define SCI_GETMARGINTYPEN 2241 157 | #define SCI_SETMARGINWIDTHN 2242 158 | #define SCI_GETMARGINWIDTHN 2243 159 | #define SCI_SETMARGINMASKN 2244 160 | #define SCI_GETMARGINMASKN 2245 161 | #define SCI_SETMARGINSENSITIVEN 2246 162 | #define SCI_GETMARGINSENSITIVEN 2247 163 | #define STYLE_DEFAULT 32 164 | #define STYLE_LINENUMBER 33 165 | #define STYLE_BRACELIGHT 34 166 | #define STYLE_BRACEBAD 35 167 | #define STYLE_CONTROLCHAR 36 168 | #define STYLE_INDENTGUIDE 37 169 | #define STYLE_CALLTIP 38 170 | #define STYLE_LASTPREDEFINED 39 171 | #define STYLE_MAX 255 172 | #define SC_CHARSET_ANSI 0 173 | #define SC_CHARSET_DEFAULT 1 174 | #define SC_CHARSET_BALTIC 186 175 | #define SC_CHARSET_CHINESEBIG5 136 176 | #define SC_CHARSET_EASTEUROPE 238 177 | #define SC_CHARSET_GB2312 134 178 | #define SC_CHARSET_GREEK 161 179 | #define SC_CHARSET_HANGUL 129 180 | #define SC_CHARSET_MAC 77 181 | #define SC_CHARSET_OEM 255 182 | #define SC_CHARSET_RUSSIAN 204 183 | #define SC_CHARSET_CYRILLIC 1251 184 | #define SC_CHARSET_SHIFTJIS 128 185 | #define SC_CHARSET_SYMBOL 2 186 | #define SC_CHARSET_TURKISH 162 187 | #define SC_CHARSET_JOHAB 130 188 | #define SC_CHARSET_HEBREW 177 189 | #define SC_CHARSET_ARABIC 178 190 | #define SC_CHARSET_VIETNAMESE 163 191 | #define SC_CHARSET_THAI 222 192 | #define SC_CHARSET_8859_15 1000 193 | #define SCI_STYLECLEARALL 2050 194 | #define SCI_STYLESETFORE 2051 195 | #define SCI_STYLESETBACK 2052 196 | #define SCI_STYLESETBOLD 2053 197 | #define SCI_STYLESETITALIC 2054 198 | #define SCI_STYLESETSIZE 2055 199 | #define SCI_STYLESETFONT 2056 200 | #define SCI_STYLESETEOLFILLED 2057 201 | #define SCI_STYLERESETDEFAULT 2058 202 | #define SCI_STYLESETUNDERLINE 2059 203 | #define SC_CASE_MIXED 0 204 | #define SC_CASE_UPPER 1 205 | #define SC_CASE_LOWER 2 206 | #define SCI_STYLEGETFORE 2481 207 | #define SCI_STYLEGETBACK 2482 208 | #define SCI_STYLEGETBOLD 2483 209 | #define SCI_STYLEGETITALIC 2484 210 | #define SCI_STYLEGETSIZE 2485 211 | #define SCI_STYLEGETFONT 2486 212 | #define SCI_STYLEGETEOLFILLED 2487 213 | #define SCI_STYLEGETUNDERLINE 2488 214 | #define SCI_STYLEGETCASE 2489 215 | #define SCI_STYLEGETCHARACTERSET 2490 216 | #define SCI_STYLEGETVISIBLE 2491 217 | #define SCI_STYLEGETCHANGEABLE 2492 218 | #define SCI_STYLEGETHOTSPOT 2493 219 | #define SCI_STYLESETCASE 2060 220 | #define SCI_STYLESETCHARACTERSET 2066 221 | #define SCI_STYLESETHOTSPOT 2409 222 | #define SCI_SETSELFORE 2067 223 | #define SCI_SETSELBACK 2068 224 | #define SCI_GETSELALPHA 2477 225 | #define SCI_SETSELALPHA 2478 226 | #define SCI_GETSELEOLFILLED 2479 227 | #define SCI_SETSELEOLFILLED 2480 228 | #define SCI_SETCARETFORE 2069 229 | #define SCI_ASSIGNCMDKEY 2070 230 | #define SCI_CLEARCMDKEY 2071 231 | #define SCI_CLEARALLCMDKEYS 2072 232 | #define SCI_SETSTYLINGEX 2073 233 | #define SCI_STYLESETVISIBLE 2074 234 | #define SCI_GETCARETPERIOD 2075 235 | #define SCI_SETCARETPERIOD 2076 236 | #define SCI_SETWORDCHARS 2077 237 | #define SCI_BEGINUNDOACTION 2078 238 | #define SCI_ENDUNDOACTION 2079 239 | #define INDIC_PLAIN 0 240 | #define INDIC_SQUIGGLE 1 241 | #define INDIC_TT 2 242 | #define INDIC_DIAGONAL 3 243 | #define INDIC_STRIKE 4 244 | #define INDIC_HIDDEN 5 245 | #define INDIC_BOX 6 246 | #define INDIC_ROUNDBOX 7 247 | #define INDIC_MAX 31 248 | #define INDIC_CONTAINER 8 249 | #define INDIC0_MASK 0x20 250 | #define INDIC1_MASK 0x40 251 | #define INDIC2_MASK 0x80 252 | #define INDICS_MASK 0xE0 253 | #define SCI_INDICSETSTYLE 2080 254 | #define SCI_INDICGETSTYLE 2081 255 | #define SCI_INDICSETFORE 2082 256 | #define SCI_INDICGETFORE 2083 257 | #define SCI_INDICSETUNDER 2510 258 | #define SCI_INDICGETUNDER 2511 259 | #define SCI_SETWHITESPACEFORE 2084 260 | #define SCI_SETWHITESPACEBACK 2085 261 | #define SCI_SETWHITESPACESIZE 2086 262 | #define SCI_GETWHITESPACESIZE 2087 263 | #define SCI_SETSTYLEBITS 2090 264 | #define SCI_GETSTYLEBITS 2091 265 | #define SCI_SETLINESTATE 2092 266 | #define SCI_GETLINESTATE 2093 267 | #define SCI_GETMAXLINESTATE 2094 268 | #define SCI_GETCARETLINEVISIBLE 2095 269 | #define SCI_SETCARETLINEVISIBLE 2096 270 | #define SCI_GETCARETLINEBACK 2097 271 | #define SCI_SETCARETLINEBACK 2098 272 | #define SCI_STYLESETCHANGEABLE 2099 273 | #define SCI_AUTOCSHOW 2100 274 | #define SCI_AUTOCCANCEL 2101 275 | #define SCI_AUTOCACTIVE 2102 276 | #define SCI_AUTOCPOSSTART 2103 277 | #define SCI_AUTOCCOMPLETE 2104 278 | #define SCI_AUTOCSTOPS 2105 279 | #define SCI_AUTOCSETSEPARATOR 2106 280 | #define SCI_AUTOCGETSEPARATOR 2107 281 | #define SCI_AUTOCSELECT 2108 282 | #define SCI_AUTOCSETCANCELATSTART 2110 283 | #define SCI_AUTOCGETCANCELATSTART 2111 284 | #define SCI_AUTOCSETFILLUPS 2112 285 | #define SCI_AUTOCSETCHOOSESINGLE 2113 286 | #define SCI_AUTOCGETCHOOSESINGLE 2114 287 | #define SCI_AUTOCSETIGNORECASE 2115 288 | #define SCI_AUTOCGETIGNORECASE 2116 289 | #define SCI_USERLISTSHOW 2117 290 | #define SCI_AUTOCSETAUTOHIDE 2118 291 | #define SCI_AUTOCGETAUTOHIDE 2119 292 | #define SCI_AUTOCSETDROPRESTOFWORD 2270 293 | #define SCI_AUTOCGETDROPRESTOFWORD 2271 294 | #define SCI_REGISTERIMAGE 2405 295 | #define SCI_CLEARREGISTEREDIMAGES 2408 296 | #define SCI_AUTOCGETTYPESEPARATOR 2285 297 | #define SCI_AUTOCSETTYPESEPARATOR 2286 298 | #define SCI_AUTOCSETMAXWIDTH 2208 299 | #define SCI_AUTOCGETMAXWIDTH 2209 300 | #define SCI_AUTOCSETMAXHEIGHT 2210 301 | #define SCI_AUTOCGETMAXHEIGHT 2211 302 | #define SCI_SETINDENT 2122 303 | #define SCI_GETINDENT 2123 304 | #define SCI_SETUSETABS 2124 305 | #define SCI_GETUSETABS 2125 306 | #define SCI_SETLINEINDENTATION 2126 307 | #define SCI_GETLINEINDENTATION 2127 308 | #define SCI_GETLINEINDENTPOSITION 2128 309 | #define SCI_GETCOLUMN 2129 310 | #define SCI_SETHSCROLLBAR 2130 311 | #define SCI_GETHSCROLLBAR 2131 312 | #define SC_IV_NONE 0 313 | #define SC_IV_REAL 1 314 | #define SC_IV_LOOKFORWARD 2 315 | #define SC_IV_LOOKBOTH 3 316 | #define SCI_SETINDENTATIONGUIDES 2132 317 | #define SCI_GETINDENTATIONGUIDES 2133 318 | #define SCI_SETHIGHLIGHTGUIDE 2134 319 | #define SCI_GETHIGHLIGHTGUIDE 2135 320 | #define SCI_GETLINEENDPOSITION 2136 321 | #define SCI_GETCODEPAGE 2137 322 | #define SCI_GETCARETFORE 2138 323 | #define SCI_GETUSEPALETTE 2139 324 | #define SCI_GETREADONLY 2140 325 | #define SCI_SETCURRENTPOS 2141 326 | #define SCI_SETSELECTIONSTART 2142 327 | #define SCI_GETSELECTIONSTART 2143 328 | #define SCI_SETSELECTIONEND 2144 329 | #define SCI_GETSELECTIONEND 2145 330 | #define SCI_SETPRINTMAGNIFICATION 2146 331 | #define SCI_GETPRINTMAGNIFICATION 2147 332 | #define SC_PRINT_NORMAL 0 333 | #define SC_PRINT_INVERTLIGHT 1 334 | #define SC_PRINT_BLACKONWHITE 2 335 | #define SC_PRINT_COLOURONWHITE 3 336 | #define SC_PRINT_COLOURONWHITEDEFAULTBG 4 337 | #define SCI_SETPRINTCOLOURMODE 2148 338 | #define SCI_GETPRINTCOLOURMODE 2149 339 | #define SCFIND_WHOLEWORD 2 340 | #define SCFIND_MATCHCASE 4 341 | #define SCFIND_WORDSTART 0x00100000 342 | #define SCFIND_REGEXP 0x00200000 343 | #define SCFIND_POSIX 0x00400000 344 | #define SCI_FINDTEXT 2150 345 | #define SCI_FORMATRANGE 2151 346 | #define SCI_GETFIRSTVISIBLELINE 2152 347 | #define SCI_GETLINE 2153 348 | #define SCI_GETLINECOUNT 2154 349 | #define SCI_SETMARGINLEFT 2155 350 | #define SCI_GETMARGINLEFT 2156 351 | #define SCI_SETMARGINRIGHT 2157 352 | #define SCI_GETMARGINRIGHT 2158 353 | #define SCI_GETMODIFY 2159 354 | #define SCI_SETSEL 2160 355 | #define SCI_GETSELTEXT 2161 356 | #define SCI_GETTEXTRANGE 2162 357 | #define SCI_HIDESELECTION 2163 358 | #define SCI_POINTXFROMPOSITION 2164 359 | #define SCI_POINTYFROMPOSITION 2165 360 | #define SCI_LINEFROMPOSITION 2166 361 | #define SCI_POSITIONFROMLINE 2167 362 | #define SCI_LINESCROLL 2168 363 | #define SCI_SCROLLCARET 2169 364 | #define SCI_REPLACESEL 2170 365 | #define SCI_SETREADONLY 2171 366 | #define SCI_NULL 2172 367 | #define SCI_CANPASTE 2173 368 | #define SCI_CANUNDO 2174 369 | #define SCI_EMPTYUNDOBUFFER 2175 370 | #define SCI_UNDO 2176 371 | #define SCI_CUT 2177 372 | #define SCI_COPY 2178 373 | #define SCI_PASTE 2179 374 | #define SCI_CLEAR 2180 375 | #define SCI_SETTEXT 2181 376 | #define SCI_GETTEXT 2182 377 | #define SCI_GETTEXTLENGTH 2183 378 | #define SCI_GETDIRECTFUNCTION 2184 379 | #define SCI_GETDIRECTPOINTER 2185 380 | #define SCI_SETOVERTYPE 2186 381 | #define SCI_GETOVERTYPE 2187 382 | #define SCI_SETCARETWIDTH 2188 383 | #define SCI_GETCARETWIDTH 2189 384 | #define SCI_SETTARGETSTART 2190 385 | #define SCI_GETTARGETSTART 2191 386 | #define SCI_SETTARGETEND 2192 387 | #define SCI_GETTARGETEND 2193 388 | #define SCI_REPLACETARGET 2194 389 | #define SCI_REPLACETARGETRE 2195 390 | #define SCI_SEARCHINTARGET 2197 391 | #define SCI_SETSEARCHFLAGS 2198 392 | #define SCI_GETSEARCHFLAGS 2199 393 | #define SCI_CALLTIPSHOW 2200 394 | #define SCI_CALLTIPCANCEL 2201 395 | #define SCI_CALLTIPACTIVE 2202 396 | #define SCI_CALLTIPPOSSTART 2203 397 | #define SCI_CALLTIPSETHLT 2204 398 | #define SCI_CALLTIPSETBACK 2205 399 | #define SCI_CALLTIPSETFORE 2206 400 | #define SCI_CALLTIPSETFOREHLT 2207 401 | #define SCI_CALLTIPUSESTYLE 2212 402 | #define SCI_VISIBLEFROMDOCLINE 2220 403 | #define SCI_DOCLINEFROMVISIBLE 2221 404 | #define SCI_WRAPCOUNT 2235 405 | #define SC_FOLDLEVELBASE 0x400 406 | #define SC_FOLDLEVELWHITEFLAG 0x1000 407 | #define SC_FOLDLEVELHEADERFLAG 0x2000 408 | #define SC_FOLDLEVELNUMBERMASK 0x0FFF 409 | #define SCI_SETFOLDLEVEL 2222 410 | #define SCI_GETFOLDLEVEL 2223 411 | #define SCI_GETLASTCHILD 2224 412 | #define SCI_GETFOLDPARENT 2225 413 | #define SCI_SHOWLINES 2226 414 | #define SCI_HIDELINES 2227 415 | #define SCI_GETLINEVISIBLE 2228 416 | #define SCI_SETFOLDEXPANDED 2229 417 | #define SCI_GETFOLDEXPANDED 2230 418 | #define SCI_TOGGLEFOLD 2231 419 | #define SCI_ENSUREVISIBLE 2232 420 | #define SC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002 421 | #define SC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004 422 | #define SC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008 423 | #define SC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010 424 | #define SC_FOLDFLAG_LEVELNUMBERS 0x0040 425 | #define SCI_SETFOLDFLAGS 2233 426 | #define SCI_ENSUREVISIBLEENFORCEPOLICY 2234 427 | #define SCI_SETTABINDENTS 2260 428 | #define SCI_GETTABINDENTS 2261 429 | #define SCI_SETBACKSPACEUNINDENTS 2262 430 | #define SCI_GETBACKSPACEUNINDENTS 2263 431 | #define SC_TIME_FOREVER 10000000 432 | #define SCI_SETMOUSEDWELLTIME 2264 433 | #define SCI_GETMOUSEDWELLTIME 2265 434 | #define SCI_WORDSTARTPOSITION 2266 435 | #define SCI_WORDENDPOSITION 2267 436 | #define SC_WRAP_NONE 0 437 | #define SC_WRAP_WORD 1 438 | #define SC_WRAP_CHAR 2 439 | #define SCI_SETWRAPMODE 2268 440 | #define SCI_GETWRAPMODE 2269 441 | #define SC_WRAPVISUALFLAG_NONE 0x0000 442 | #define SC_WRAPVISUALFLAG_END 0x0001 443 | #define SC_WRAPVISUALFLAG_START 0x0002 444 | #define SCI_SETWRAPVISUALFLAGS 2460 445 | #define SCI_GETWRAPVISUALFLAGS 2461 446 | #define SC_WRAPVISUALFLAGLOC_DEFAULT 0x0000 447 | #define SC_WRAPVISUALFLAGLOC_END_BY_TEXT 0x0001 448 | #define SC_WRAPVISUALFLAGLOC_START_BY_TEXT 0x0002 449 | #define SCI_SETWRAPVISUALFLAGSLOCATION 2462 450 | #define SCI_GETWRAPVISUALFLAGSLOCATION 2463 451 | #define SCI_SETWRAPSTARTINDENT 2464 452 | #define SCI_GETWRAPSTARTINDENT 2465 453 | #define SC_WRAPINDENT_FIXED 0 454 | #define SC_WRAPINDENT_SAME 1 455 | #define SC_WRAPINDENT_INDENT 2 456 | #define SCI_SETWRAPINDENTMODE 2472 457 | #define SCI_GETWRAPINDENTMODE 2473 458 | #define SC_CACHE_NONE 0 459 | #define SC_CACHE_CARET 1 460 | #define SC_CACHE_PAGE 2 461 | #define SC_CACHE_DOCUMENT 3 462 | #define SCI_SETLAYOUTCACHE 2272 463 | #define SCI_GETLAYOUTCACHE 2273 464 | #define SCI_SETSCROLLWIDTH 2274 465 | #define SCI_GETSCROLLWIDTH 2275 466 | #define SCI_SETSCROLLWIDTHTRACKING 2516 467 | #define SCI_GETSCROLLWIDTHTRACKING 2517 468 | #define SCI_TEXTWIDTH 2276 469 | #define SCI_SETENDATLASTLINE 2277 470 | #define SCI_GETENDATLASTLINE 2278 471 | #define SCI_TEXTHEIGHT 2279 472 | #define SCI_SETVSCROLLBAR 2280 473 | #define SCI_GETVSCROLLBAR 2281 474 | #define SCI_APPENDTEXT 2282 475 | #define SCI_GETTWOPHASEDRAW 2283 476 | #define SCI_SETTWOPHASEDRAW 2284 477 | #define SC_EFF_QUALITY_MASK 0xF 478 | #define SC_EFF_QUALITY_DEFAULT 0 479 | #define SC_EFF_QUALITY_NON_ANTIALIASED 1 480 | #define SC_EFF_QUALITY_ANTIALIASED 2 481 | #define SC_EFF_QUALITY_LCD_OPTIMIZED 3 482 | #define SCI_SETFONTQUALITY 2611 483 | #define SCI_GETFONTQUALITY 2612 484 | #define SCI_SETFIRSTVISIBLELINE 2613 485 | #define SC_MULTIPASTE_ONCE 0 486 | #define SC_MULTIPASTE_EACH 1 487 | #define SCI_SETMULTIPASTE 2614 488 | #define SCI_GETMULTIPASTE 2615 489 | #define SCI_GETTAG 2616 490 | #define SCI_TARGETFROMSELECTION 2287 491 | #define SCI_LINESJOIN 2288 492 | #define SCI_LINESSPLIT 2289 493 | #define SCI_SETFOLDMARGINCOLOUR 2290 494 | #define SCI_SETFOLDMARGINHICOLOUR 2291 495 | #define SCI_LINEDOWN 2300 496 | #define SCI_LINEDOWNEXTEND 2301 497 | #define SCI_LINEUP 2302 498 | #define SCI_LINEUPEXTEND 2303 499 | #define SCI_CHARLEFT 2304 500 | #define SCI_CHARLEFTEXTEND 2305 501 | #define SCI_CHARRIGHT 2306 502 | #define SCI_CHARRIGHTEXTEND 2307 503 | #define SCI_WORDLEFT 2308 504 | #define SCI_WORDLEFTEXTEND 2309 505 | #define SCI_WORDRIGHT 2310 506 | #define SCI_WORDRIGHTEXTEND 2311 507 | #define SCI_HOME 2312 508 | #define SCI_HOMEEXTEND 2313 509 | #define SCI_LINEEND 2314 510 | #define SCI_LINEENDEXTEND 2315 511 | #define SCI_DOCUMENTSTART 2316 512 | #define SCI_DOCUMENTSTARTEXTEND 2317 513 | #define SCI_DOCUMENTEND 2318 514 | #define SCI_DOCUMENTENDEXTEND 2319 515 | #define SCI_PAGEUP 2320 516 | #define SCI_PAGEUPEXTEND 2321 517 | #define SCI_PAGEDOWN 2322 518 | #define SCI_PAGEDOWNEXTEND 2323 519 | #define SCI_EDITTOGGLEOVERTYPE 2324 520 | #define SCI_CANCEL 2325 521 | #define SCI_DELETEBACK 2326 522 | #define SCI_TAB 2327 523 | #define SCI_BACKTAB 2328 524 | #define SCI_NEWLINE 2329 525 | #define SCI_FORMFEED 2330 526 | #define SCI_VCHOME 2331 527 | #define SCI_VCHOMEEXTEND 2332 528 | #define SCI_ZOOMIN 2333 529 | #define SCI_ZOOMOUT 2334 530 | #define SCI_DELWORDLEFT 2335 531 | #define SCI_DELWORDRIGHT 2336 532 | #define SCI_DELWORDRIGHTEND 2518 533 | #define SCI_LINECUT 2337 534 | #define SCI_LINEDELETE 2338 535 | #define SCI_LINETRANSPOSE 2339 536 | #define SCI_LINEDUPLICATE 2404 537 | #define SCI_LOWERCASE 2340 538 | #define SCI_UPPERCASE 2341 539 | #define SCI_LINESCROLLDOWN 2342 540 | #define SCI_LINESCROLLUP 2343 541 | #define SCI_DELETEBACKNOTLINE 2344 542 | #define SCI_HOMEDISPLAY 2345 543 | #define SCI_HOMEDISPLAYEXTEND 2346 544 | #define SCI_LINEENDDISPLAY 2347 545 | #define SCI_LINEENDDISPLAYEXTEND 2348 546 | #define SCI_HOMEWRAP 2349 547 | #define SCI_HOMEWRAPEXTEND 2450 548 | #define SCI_LINEENDWRAP 2451 549 | #define SCI_LINEENDWRAPEXTEND 2452 550 | #define SCI_VCHOMEWRAP 2453 551 | #define SCI_VCHOMEWRAPEXTEND 2454 552 | #define SCI_LINECOPY 2455 553 | #define SCI_MOVECARETINSIDEVIEW 2401 554 | #define SCI_LINELENGTH 2350 555 | #define SCI_BRACEHIGHLIGHT 2351 556 | #define SCI_BRACEBADLIGHT 2352 557 | #define SCI_BRACEMATCH 2353 558 | #define SCI_GETVIEWEOL 2355 559 | #define SCI_SETVIEWEOL 2356 560 | #define SCI_GETDOCPOINTER 2357 561 | #define SCI_SETDOCPOINTER 2358 562 | #define SCI_SETMODEVENTMASK 2359 563 | #define EDGE_NONE 0 564 | #define EDGE_LINE 1 565 | #define EDGE_BACKGROUND 2 566 | #define SCI_GETEDGECOLUMN 2360 567 | #define SCI_SETEDGECOLUMN 2361 568 | #define SCI_GETEDGEMODE 2362 569 | #define SCI_SETEDGEMODE 2363 570 | #define SCI_GETEDGECOLOUR 2364 571 | #define SCI_SETEDGECOLOUR 2365 572 | #define SCI_SEARCHANCHOR 2366 573 | #define SCI_SEARCHNEXT 2367 574 | #define SCI_SEARCHPREV 2368 575 | #define SCI_LINESONSCREEN 2370 576 | #define SCI_USEPOPUP 2371 577 | #define SCI_SELECTIONISRECTANGLE 2372 578 | #define SCI_SETZOOM 2373 579 | #define SCI_GETZOOM 2374 580 | #define SCI_CREATEDOCUMENT 2375 581 | #define SCI_ADDREFDOCUMENT 2376 582 | #define SCI_RELEASEDOCUMENT 2377 583 | #define SCI_GETMODEVENTMASK 2378 584 | #define SCI_SETFOCUS 2380 585 | #define SCI_GETFOCUS 2381 586 | #define SC_STATUS_OK 0 587 | #define SC_STATUS_FAILURE 1 588 | #define SC_STATUS_BADALLOC 2 589 | #define SCI_SETSTATUS 2382 590 | #define SCI_GETSTATUS 2383 591 | #define SCI_SETMOUSEDOWNCAPTURES 2384 592 | #define SCI_GETMOUSEDOWNCAPTURES 2385 593 | #define SC_CURSORNORMAL -1 594 | #define SC_CURSORWAIT 4 595 | #define SCI_SETCURSOR 2386 596 | #define SCI_GETCURSOR 2387 597 | #define SCI_SETCONTROLCHARSYMBOL 2388 598 | #define SCI_GETCONTROLCHARSYMBOL 2389 599 | #define SCI_WORDPARTLEFT 2390 600 | #define SCI_WORDPARTLEFTEXTEND 2391 601 | #define SCI_WORDPARTRIGHT 2392 602 | #define SCI_WORDPARTRIGHTEXTEND 2393 603 | #define VISIBLE_SLOP 0x01 604 | #define VISIBLE_STRICT 0x04 605 | #define SCI_SETVISIBLEPOLICY 2394 606 | #define SCI_DELLINELEFT 2395 607 | #define SCI_DELLINERIGHT 2396 608 | #define SCI_SETXOFFSET 2397 609 | #define SCI_GETXOFFSET 2398 610 | #define SCI_CHOOSECARETX 2399 611 | #define SCI_GRABFOCUS 2400 612 | #define CARET_SLOP 0x01 613 | #define CARET_STRICT 0x04 614 | #define CARET_JUMPS 0x10 615 | #define CARET_EVEN 0x08 616 | #define SCI_SETXCARETPOLICY 2402 617 | #define SCI_SETYCARETPOLICY 2403 618 | #define SCI_SETPRINTWRAPMODE 2406 619 | #define SCI_GETPRINTWRAPMODE 2407 620 | #define SCI_SETHOTSPOTACTIVEFORE 2410 621 | #define SCI_GETHOTSPOTACTIVEFORE 2494 622 | #define SCI_SETHOTSPOTACTIVEBACK 2411 623 | #define SCI_GETHOTSPOTACTIVEBACK 2495 624 | #define SCI_SETHOTSPOTACTIVEUNDERLINE 2412 625 | #define SCI_GETHOTSPOTACTIVEUNDERLINE 2496 626 | #define SCI_SETHOTSPOTSINGLELINE 2421 627 | #define SCI_GETHOTSPOTSINGLELINE 2497 628 | #define SCI_PARADOWN 2413 629 | #define SCI_PARADOWNEXTEND 2414 630 | #define SCI_PARAUP 2415 631 | #define SCI_PARAUPEXTEND 2416 632 | #define SCI_POSITIONBEFORE 2417 633 | #define SCI_POSITIONAFTER 2418 634 | #define SCI_COPYRANGE 2419 635 | #define SCI_COPYTEXT 2420 636 | #define SC_SEL_STREAM 0 637 | #define SC_SEL_RECTANGLE 1 638 | #define SC_SEL_LINES 2 639 | #define SC_SEL_THIN 3 640 | #define SCI_SETSELECTIONMODE 2422 641 | #define SCI_GETSELECTIONMODE 2423 642 | #define SCI_GETLINESELSTARTPOSITION 2424 643 | #define SCI_GETLINESELENDPOSITION 2425 644 | #define SCI_LINEDOWNRECTEXTEND 2426 645 | #define SCI_LINEUPRECTEXTEND 2427 646 | #define SCI_CHARLEFTRECTEXTEND 2428 647 | #define SCI_CHARRIGHTRECTEXTEND 2429 648 | #define SCI_HOMERECTEXTEND 2430 649 | #define SCI_VCHOMERECTEXTEND 2431 650 | #define SCI_LINEENDRECTEXTEND 2432 651 | #define SCI_PAGEUPRECTEXTEND 2433 652 | #define SCI_PAGEDOWNRECTEXTEND 2434 653 | #define SCI_STUTTEREDPAGEUP 2435 654 | #define SCI_STUTTEREDPAGEUPEXTEND 2436 655 | #define SCI_STUTTEREDPAGEDOWN 2437 656 | #define SCI_STUTTEREDPAGEDOWNEXTEND 2438 657 | #define SCI_WORDLEFTEND 2439 658 | #define SCI_WORDLEFTENDEXTEND 2440 659 | #define SCI_WORDRIGHTEND 2441 660 | #define SCI_WORDRIGHTENDEXTEND 2442 661 | #define SCI_SETWHITESPACECHARS 2443 662 | #define SCI_SETCHARSDEFAULT 2444 663 | #define SCI_AUTOCGETCURRENT 2445 664 | #define SCI_AUTOCGETCURRENTTEXT 2610 665 | #define SCI_ALLOCATE 2446 666 | #define SCI_TARGETASUTF8 2447 667 | #define SCI_SETLENGTHFORENCODE 2448 668 | #define SCI_ENCODEDFROMUTF8 2449 669 | #define SCI_FINDCOLUMN 2456 670 | #define SCI_GETCARETSTICKY 2457 671 | #define SCI_SETCARETSTICKY 2458 672 | #define SCI_TOGGLECARETSTICKY 2459 673 | #define SCI_SETPASTECONVERTENDINGS 2467 674 | #define SCI_GETPASTECONVERTENDINGS 2468 675 | #define SCI_SELECTIONDUPLICATE 2469 676 | #define SC_ALPHA_TRANSPARENT 0 677 | #define SC_ALPHA_OPAQUE 255 678 | #define SC_ALPHA_NOALPHA 256 679 | #define SCI_SETCARETLINEBACKALPHA 2470 680 | #define SCI_GETCARETLINEBACKALPHA 2471 681 | #define CARETSTYLE_INVISIBLE 0 682 | #define CARETSTYLE_LINE 1 683 | #define CARETSTYLE_BLOCK 2 684 | #define SCI_SETCARETSTYLE 2512 685 | #define SCI_GETCARETSTYLE 2513 686 | #define SCI_SETINDICATORCURRENT 2500 687 | #define SCI_GETINDICATORCURRENT 2501 688 | #define SCI_SETINDICATORVALUE 2502 689 | #define SCI_GETINDICATORVALUE 2503 690 | #define SCI_INDICATORFILLRANGE 2504 691 | #define SCI_INDICATORCLEARRANGE 2505 692 | #define SCI_INDICATORALLONFOR 2506 693 | #define SCI_INDICATORVALUEAT 2507 694 | #define SCI_INDICATORSTART 2508 695 | #define SCI_INDICATOREND 2509 696 | #define SCI_SETPOSITIONCACHE 2514 697 | #define SCI_GETPOSITIONCACHE 2515 698 | #define SCI_COPYALLOWLINE 2519 699 | #define SCI_GETCHARACTERPOINTER 2520 700 | #define SCI_SETKEYSUNICODE 2521 701 | #define SCI_GETKEYSUNICODE 2522 702 | #define SCI_INDICSETALPHA 2523 703 | #define SCI_INDICGETALPHA 2524 704 | #define SCI_SETEXTRAASCENT 2525 705 | #define SCI_GETEXTRAASCENT 2526 706 | #define SCI_SETEXTRADESCENT 2527 707 | #define SCI_GETEXTRADESCENT 2528 708 | #define SCI_MARKERSYMBOLDEFINED 2529 709 | #define SCI_MARGINSETTEXT 2530 710 | #define SCI_MARGINGETTEXT 2531 711 | #define SCI_MARGINSETSTYLE 2532 712 | #define SCI_MARGINGETSTYLE 2533 713 | #define SCI_MARGINSETSTYLES 2534 714 | #define SCI_MARGINGETSTYLES 2535 715 | #define SCI_MARGINTEXTCLEARALL 2536 716 | #define SCI_MARGINSETSTYLEOFFSET 2537 717 | #define SCI_MARGINGETSTYLEOFFSET 2538 718 | #define SCI_ANNOTATIONSETTEXT 2540 719 | #define SCI_ANNOTATIONGETTEXT 2541 720 | #define SCI_ANNOTATIONSETSTYLE 2542 721 | #define SCI_ANNOTATIONGETSTYLE 2543 722 | #define SCI_ANNOTATIONSETSTYLES 2544 723 | #define SCI_ANNOTATIONGETSTYLES 2545 724 | #define SCI_ANNOTATIONGETLINES 2546 725 | #define SCI_ANNOTATIONCLEARALL 2547 726 | #define ANNOTATION_HIDDEN 0 727 | #define ANNOTATION_STANDARD 1 728 | #define ANNOTATION_BOXED 2 729 | #define SCI_ANNOTATIONSETVISIBLE 2548 730 | #define SCI_ANNOTATIONGETVISIBLE 2549 731 | #define SCI_ANNOTATIONSETSTYLEOFFSET 2550 732 | #define SCI_ANNOTATIONGETSTYLEOFFSET 2551 733 | #define UNDO_MAY_COALESCE 1 734 | #define SCI_ADDUNDOACTION 2560 735 | #define SCI_CHARPOSITIONFROMPOINT 2561 736 | #define SCI_CHARPOSITIONFROMPOINTCLOSE 2562 737 | #define SCI_SETMULTIPLESELECTION 2563 738 | #define SCI_GETMULTIPLESELECTION 2564 739 | #define SCI_SETADDITIONALSELECTIONTYPING 2565 740 | #define SCI_GETADDITIONALSELECTIONTYPING 2566 741 | #define SCI_SETADDITIONALCARETSBLINK 2567 742 | #define SCI_GETADDITIONALCARETSBLINK 2568 743 | #define SCI_SETADDITIONALCARETSVISIBLE 2608 744 | #define SCI_GETADDITIONALCARETSVISIBLE 2609 745 | #define SCI_GETSELECTIONS 2570 746 | #define SCI_CLEARSELECTIONS 2571 747 | #define SCI_SETSELECTION 2572 748 | #define SCI_ADDSELECTION 2573 749 | #define SCI_SETMAINSELECTION 2574 750 | #define SCI_GETMAINSELECTION 2575 751 | #define SCI_SETSELECTIONNCARET 2576 752 | #define SCI_GETSELECTIONNCARET 2577 753 | #define SCI_SETSELECTIONNANCHOR 2578 754 | #define SCI_GETSELECTIONNANCHOR 2579 755 | #define SCI_SETSELECTIONNCARETVIRTUALSPACE 2580 756 | #define SCI_GETSELECTIONNCARETVIRTUALSPACE 2581 757 | #define SCI_SETSELECTIONNANCHORVIRTUALSPACE 2582 758 | #define SCI_GETSELECTIONNANCHORVIRTUALSPACE 2583 759 | #define SCI_SETSELECTIONNSTART 2584 760 | #define SCI_GETSELECTIONNSTART 2585 761 | #define SCI_SETSELECTIONNEND 2586 762 | #define SCI_GETSELECTIONNEND 2587 763 | #define SCI_SETRECTANGULARSELECTIONCARET 2588 764 | #define SCI_GETRECTANGULARSELECTIONCARET 2589 765 | #define SCI_SETRECTANGULARSELECTIONANCHOR 2590 766 | #define SCI_GETRECTANGULARSELECTIONANCHOR 2591 767 | #define SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE 2592 768 | #define SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE 2593 769 | #define SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE 2594 770 | #define SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE 2595 771 | #define SCVS_NONE 0 772 | #define SCVS_RECTANGULARSELECTION 1 773 | #define SCVS_USERACCESSIBLE 2 774 | #define SCI_SETVIRTUALSPACEOPTIONS 2596 775 | #define SCI_GETVIRTUALSPACEOPTIONS 2597 776 | #define SCI_SETRECTANGULARSELECTIONMODIFIER 2598 777 | #define SCI_GETRECTANGULARSELECTIONMODIFIER 2599 778 | #define SCI_SETADDITIONALSELFORE 2600 779 | #define SCI_SETADDITIONALSELBACK 2601 780 | #define SCI_SETADDITIONALSELALPHA 2602 781 | #define SCI_GETADDITIONALSELALPHA 2603 782 | #define SCI_SETADDITIONALCARETFORE 2604 783 | #define SCI_GETADDITIONALCARETFORE 2605 784 | #define SCI_ROTATESELECTION 2606 785 | #define SCI_SWAPMAINANCHORCARET 2607 786 | #define SCI_STARTRECORD 3001 787 | #define SCI_STOPRECORD 3002 788 | #define SCI_SETLEXER 4001 789 | #define SCI_GETLEXER 4002 790 | #define SCI_COLOURISE 4003 791 | #define SCI_SETPROPERTY 4004 792 | #define KEYWORDSET_MAX 8 793 | #define SCI_SETKEYWORDS 4005 794 | #define SCI_SETLEXERLANGUAGE 4006 795 | #define SCI_LOADLEXERLIBRARY 4007 796 | #define SCI_GETPROPERTY 4008 797 | #define SCI_GETPROPERTYEXPANDED 4009 798 | #define SCI_GETPROPERTYINT 4010 799 | #define SCI_GETSTYLEBITSNEEDED 4011 800 | #define SCI_GETLEXERLANGUAGE 4012 801 | #define SC_MOD_INSERTTEXT 0x1 802 | #define SC_MOD_DELETETEXT 0x2 803 | #define SC_MOD_CHANGESTYLE 0x4 804 | #define SC_MOD_CHANGEFOLD 0x8 805 | #define SC_PERFORMED_USER 0x10 806 | #define SC_PERFORMED_UNDO 0x20 807 | #define SC_PERFORMED_REDO 0x40 808 | #define SC_MULTISTEPUNDOREDO 0x80 809 | #define SC_LASTSTEPINUNDOREDO 0x100 810 | #define SC_MOD_CHANGEMARKER 0x200 811 | #define SC_MOD_BEFOREINSERT 0x400 812 | #define SC_MOD_BEFOREDELETE 0x800 813 | #define SC_MULTILINEUNDOREDO 0x1000 814 | #define SC_STARTACTION 0x2000 815 | #define SC_MOD_CHANGEINDICATOR 0x4000 816 | #define SC_MOD_CHANGELINESTATE 0x8000 817 | #define SC_MOD_CHANGEMARGIN 0x10000 818 | #define SC_MOD_CHANGEANNOTATION 0x20000 819 | #define SC_MOD_CONTAINER 0x40000 820 | #define SC_MODEVENTMASKALL 0x7FFFF 821 | #define SCEN_CHANGE 768 822 | #define SCEN_SETFOCUS 512 823 | #define SCEN_KILLFOCUS 256 824 | #define SCK_DOWN 300 825 | #define SCK_UP 301 826 | #define SCK_LEFT 302 827 | #define SCK_RIGHT 303 828 | #define SCK_HOME 304 829 | #define SCK_END 305 830 | #define SCK_PRIOR 306 831 | #define SCK_NEXT 307 832 | #define SCK_DELETE 308 833 | #define SCK_INSERT 309 834 | #define SCK_ESCAPE 7 835 | #define SCK_BACK 8 836 | #define SCK_TAB 9 837 | #define SCK_RETURN 13 838 | #define SCK_ADD 310 839 | #define SCK_SUBTRACT 311 840 | #define SCK_DIVIDE 312 841 | #define SCK_WIN 313 842 | #define SCK_RWIN 314 843 | #define SCK_MENU 315 844 | #define SCMOD_NORM 0 845 | #define SCMOD_SHIFT 1 846 | #define SCMOD_CTRL 2 847 | #define SCMOD_ALT 4 848 | #define SCMOD_SUPER 8 849 | #define SCN_STYLENEEDED 2000 850 | #define SCN_CHARADDED 2001 851 | #define SCN_SAVEPOINTREACHED 2002 852 | #define SCN_SAVEPOINTLEFT 2003 853 | #define SCN_MODIFYATTEMPTRO 2004 854 | #define SCN_KEY 2005 855 | #define SCN_DOUBLECLICK 2006 856 | #define SCN_UPDATEUI 2007 857 | #define SCN_MODIFIED 2008 858 | #define SCN_MACRORECORD 2009 859 | #define SCN_MARGINCLICK 2010 860 | #define SCN_NEEDSHOWN 2011 861 | #define SCN_PAINTED 2013 862 | #define SCN_USERLISTSELECTION 2014 863 | #define SCN_URIDROPPED 2015 864 | #define SCN_DWELLSTART 2016 865 | #define SCN_DWELLEND 2017 866 | #define SCN_ZOOM 2018 867 | #define SCN_HOTSPOTCLICK 2019 868 | #define SCN_HOTSPOTDOUBLECLICK 2020 869 | #define SCN_CALLTIPCLICK 2021 870 | #define SCN_AUTOCSELECTION 2022 871 | #define SCN_INDICATORCLICK 2023 872 | #define SCN_INDICATORRELEASE 2024 873 | #define SCN_AUTOCCANCELLED 2025 874 | #define SCN_AUTOCCHARDELETED 2026 875 | /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ 876 | 877 | /* These structures are defined to be exactly the same shape as the Win32 878 | * CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs. 879 | * So older code that treats Scintilla as a RichEdit will work. */ 880 | 881 | #ifdef SCI_NAMESPACE 882 | namespace Scintilla { 883 | #endif 884 | 885 | struct Sci_CharacterRange { 886 | long cpMin; 887 | long cpMax; 888 | }; 889 | 890 | struct Sci_TextRange { 891 | struct Sci_CharacterRange chrg; 892 | char *lpstrText; 893 | }; 894 | 895 | struct Sci_TextToFind { 896 | struct Sci_CharacterRange chrg; 897 | char *lpstrText; 898 | struct Sci_CharacterRange chrgText; 899 | }; 900 | 901 | #define CharacterRange Sci_CharacterRange 902 | #define TextRange Sci_TextRange 903 | #define TextToFind Sci_TextToFind 904 | 905 | typedef void *Sci_SurfaceID; 906 | 907 | struct Sci_Rectangle { 908 | int left; 909 | int top; 910 | int right; 911 | int bottom; 912 | }; 913 | 914 | /* This structure is used in printing and requires some of the graphics types 915 | * from Platform.h. Not needed by most client code. */ 916 | 917 | struct Sci_RangeToFormat { 918 | Sci_SurfaceID hdc; 919 | Sci_SurfaceID hdcTarget; 920 | struct Sci_Rectangle rc; 921 | struct Sci_Rectangle rcPage; 922 | struct Sci_CharacterRange chrg; 923 | }; 924 | 925 | #define RangeToFormat Sci_RangeToFormat 926 | 927 | struct Sci_NotifyHeader { 928 | /* Compatible with Windows NMHDR. 929 | * hwndFrom is really an environment specific window handle or pointer 930 | * but most clients of Scintilla.h do not have this type visible. */ 931 | void *hwndFrom; 932 | uptr_t idFrom; 933 | unsigned int code; 934 | }; 935 | 936 | #define NotifyHeader Sci_NotifyHeader 937 | 938 | struct SCNotification { 939 | struct Sci_NotifyHeader nmhdr; 940 | int position; /* SCN_STYLENEEDED, SCN_MODIFIED, SCN_DWELLSTART, SCN_DWELLEND */ 941 | int ch; /* SCN_CHARADDED, SCN_KEY */ 942 | int modifiers; /* SCN_KEY */ 943 | int modificationType; /* SCN_MODIFIED */ 944 | const char *text; /* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */ 945 | int length; /* SCN_MODIFIED */ 946 | int linesAdded; /* SCN_MODIFIED */ 947 | int message; /* SCN_MACRORECORD */ 948 | uptr_t wParam; /* SCN_MACRORECORD */ 949 | sptr_t lParam; /* SCN_MACRORECORD */ 950 | int line; /* SCN_MODIFIED */ 951 | int foldLevelNow; /* SCN_MODIFIED */ 952 | int foldLevelPrev; /* SCN_MODIFIED */ 953 | int margin; /* SCN_MARGINCLICK */ 954 | int listType; /* SCN_USERLISTSELECTION */ 955 | int x; /* SCN_DWELLSTART, SCN_DWELLEND */ 956 | int y; /* SCN_DWELLSTART, SCN_DWELLEND */ 957 | int token; /* SCN_MODIFIED with SC_MOD_CONTAINER */ 958 | int annotationLinesAdded; /* SC_MOD_CHANGEANNOTATION */ 959 | }; 960 | 961 | #ifdef SCI_NAMESPACE 962 | } 963 | #endif 964 | 965 | #endif 966 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldStyleContext.cxx: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file StyleContext.cxx 3 | ** Lexer infrastructure. 4 | **/ 5 | // Copyright 1998-2004 by Neil Hodgson 6 | // This file is in the public domain. 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #define SCI_NAMESPACE 14 | 15 | #include "OldPlatform.h" 16 | 17 | #include "OldPropSet.h" 18 | #include "OldAccessor.h" 19 | #include "OldStyleContext.h" 20 | 21 | #ifdef SCI_NAMESPACE 22 | using namespace Scintilla; 23 | #endif 24 | 25 | static void getRange(unsigned int start, 26 | unsigned int end, 27 | Accessor &styler, 28 | char *s, 29 | unsigned int len) { 30 | unsigned int i = 0; 31 | while ((i < end - start + 1) && (i < len-1)) { 32 | s[i] = styler[start + i]; 33 | i++; 34 | } 35 | s[i] = '\0'; 36 | } 37 | 38 | void StyleContext::GetCurrent(char *s, unsigned int len) { 39 | getRange(styler.GetStartSegment(), currentPos - 1, styler, s, len); 40 | } 41 | 42 | static void getRangeLowered(unsigned int start, 43 | unsigned int end, 44 | Accessor &styler, 45 | char *s, 46 | unsigned int len) { 47 | unsigned int i = 0; 48 | while ((i < end - start + 1) && (i < len-1)) { 49 | s[i] = static_cast(tolower(styler[start + i])); 50 | i++; 51 | } 52 | s[i] = '\0'; 53 | } 54 | 55 | void StyleContext::GetCurrentLowered(char *s, unsigned int len) { 56 | getRangeLowered(styler.GetStartSegment(), currentPos - 1, styler, s, len); 57 | } 58 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldStyleContext.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file StyleContext.cxx 3 | ** Lexer infrastructure. 4 | **/ 5 | // Copyright 1998-2004 by Neil Hodgson 6 | // This file is in the public domain. 7 | 8 | #ifdef SCI_NAMESPACE 9 | namespace Scintilla { 10 | #endif 11 | 12 | // All languages handled so far can treat all characters >= 0x80 as one class 13 | // which just continues the current token or starts an identifier if in default. 14 | // DBCS treated specially as the second character can be < 0x80 and hence 15 | // syntactically significant. UTF-8 avoids this as all trail bytes are >= 0x80 16 | class StyleContext { 17 | Accessor &styler; 18 | unsigned int endPos; 19 | StyleContext &operator=(const StyleContext &); 20 | void GetNextChar(unsigned int pos) { 21 | chNext = static_cast(styler.SafeGetCharAt(pos+1)); 22 | if (styler.IsLeadByte(static_cast(chNext))) { 23 | chNext = chNext << 8; 24 | chNext |= static_cast(styler.SafeGetCharAt(pos+2)); 25 | } 26 | // End of line? 27 | // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) 28 | // or on LF alone (Unix). Avoid triggering two times on Dos/Win. 29 | atLineEnd = (ch == '\r' && chNext != '\n') || 30 | (ch == '\n') || 31 | (currentPos >= endPos); 32 | } 33 | 34 | public: 35 | unsigned int currentPos; 36 | bool atLineStart; 37 | bool atLineEnd; 38 | int state; 39 | int chPrev; 40 | int ch; 41 | int chNext; 42 | 43 | StyleContext(unsigned int startPos, unsigned int length, 44 | int initStyle, Accessor &styler_, char chMask=31) : 45 | styler(styler_), 46 | endPos(startPos + length), 47 | currentPos(startPos), 48 | atLineStart(true), 49 | atLineEnd(false), 50 | state(initStyle & chMask), // Mask off all bits which aren't in the chMask. 51 | chPrev(0), 52 | ch(0), 53 | chNext(0) { 54 | styler.StartAt(startPos, chMask); 55 | styler.StartSegment(startPos); 56 | unsigned int pos = currentPos; 57 | ch = static_cast(styler.SafeGetCharAt(pos)); 58 | if (styler.IsLeadByte(static_cast(ch))) { 59 | pos++; 60 | ch = ch << 8; 61 | ch |= static_cast(styler.SafeGetCharAt(pos)); 62 | } 63 | GetNextChar(pos); 64 | } 65 | void Complete() { 66 | styler.ColourTo(currentPos - 1, state); 67 | } 68 | bool More() const { 69 | return currentPos < endPos; 70 | } 71 | void Forward() { 72 | if (currentPos < endPos) { 73 | atLineStart = atLineEnd; 74 | chPrev = ch; 75 | currentPos++; 76 | if (ch >= 0x100) 77 | currentPos++; 78 | ch = chNext; 79 | GetNextChar(currentPos + ((ch >= 0x100) ? 1 : 0)); 80 | } else { 81 | atLineStart = false; 82 | chPrev = ' '; 83 | ch = ' '; 84 | chNext = ' '; 85 | atLineEnd = true; 86 | } 87 | } 88 | void Forward(int nb) { 89 | for (int i = 0; i < nb; i++) { 90 | Forward(); 91 | } 92 | } 93 | void ChangeState(int state_) { 94 | state = state_; 95 | } 96 | void SetState(int state_) { 97 | styler.ColourTo(currentPos - 1, state); 98 | state = state_; 99 | } 100 | void ForwardSetState(int state_) { 101 | Forward(); 102 | styler.ColourTo(currentPos - 1, state); 103 | state = state_; 104 | } 105 | int LengthCurrent() { 106 | return currentPos - styler.GetStartSegment(); 107 | } 108 | int GetRelative(int n) { 109 | return static_cast(styler.SafeGetCharAt(currentPos+n)); 110 | } 111 | bool Match(char ch0) const { 112 | return ch == static_cast(ch0); 113 | } 114 | bool Match(char ch0, char ch1) const { 115 | return (ch == static_cast(ch0)) && (chNext == static_cast(ch1)); 116 | } 117 | bool Match(const char *s) { 118 | if (ch != static_cast(*s)) 119 | return false; 120 | s++; 121 | if (!*s) 122 | return true; 123 | if (chNext != static_cast(*s)) 124 | return false; 125 | s++; 126 | for (int n=2; *s; n++) { 127 | if (*s != styler.SafeGetCharAt(currentPos+n)) 128 | return false; 129 | s++; 130 | } 131 | return true; 132 | } 133 | bool MatchIgnoreCase(const char *s) { 134 | if (tolower(ch) != static_cast(*s)) 135 | return false; 136 | s++; 137 | if (tolower(chNext) != static_cast(*s)) 138 | return false; 139 | s++; 140 | for (int n=2; *s; n++) { 141 | if (static_cast(*s) != 142 | tolower(static_cast(styler.SafeGetCharAt(currentPos+n)))) 143 | return false; 144 | s++; 145 | } 146 | return true; 147 | } 148 | // Non-inline 149 | void GetCurrent(char *s, unsigned int len); 150 | void GetCurrentLowered(char *s, unsigned int len); 151 | }; 152 | 153 | #ifdef SCI_NAMESPACE 154 | } 155 | #endif 156 | 157 | inline bool IsASpace(unsigned int ch) { 158 | return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); 159 | } 160 | 161 | inline bool IsASpaceOrTab(unsigned int ch) { 162 | return (ch == ' ') || (ch == '\t'); 163 | } 164 | 165 | inline bool IsADigit(unsigned int ch) { 166 | return (ch >= '0') && (ch <= '9'); 167 | } 168 | 169 | inline bool IsADigit(unsigned int ch, unsigned int base) { 170 | if (base <= 10) { 171 | return (ch >= '0') && (ch < '0' + base); 172 | } else { 173 | return ((ch >= '0') && (ch <= '9')) || 174 | ((ch >= 'A') && (ch < 'A' + base - 10)) || 175 | ((ch >= 'a') && (ch < 'a' + base - 10)); 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldUniConversion.cxx: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file UniConversion.cxx 3 | ** Functions to handle UTF-8 and UTF-16 strings. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #include 9 | 10 | #define SCI_NAMESPACE 11 | 12 | #include "OldUniConversion.h" 13 | 14 | enum { SURROGATE_LEAD_FIRST = 0xD800 }; 15 | enum { SURROGATE_TRAIL_FIRST = 0xDC00 }; 16 | enum { SURROGATE_TRAIL_LAST = 0xDFFF }; 17 | 18 | unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen) { 19 | unsigned int len = 0; 20 | for (unsigned int i = 0; i < tlen && uptr[i];) { 21 | unsigned int uch = uptr[i]; 22 | if (uch < 0x80) { 23 | len++; 24 | } else if (uch < 0x800) { 25 | len += 2; 26 | } else if ((uch >= SURROGATE_LEAD_FIRST) && 27 | (uch <= SURROGATE_TRAIL_LAST)) { 28 | len += 4; 29 | i++; 30 | } else { 31 | len += 3; 32 | } 33 | i++; 34 | } 35 | return len; 36 | } 37 | 38 | void UTF8FromUTF16(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len) { 39 | int k = 0; 40 | for (unsigned int i = 0; i < tlen && uptr[i];) { 41 | unsigned int uch = uptr[i]; 42 | if (uch < 0x80) { 43 | putf[k++] = static_cast(uch); 44 | } else if (uch < 0x800) { 45 | putf[k++] = static_cast(0xC0 | (uch >> 6)); 46 | putf[k++] = static_cast(0x80 | (uch & 0x3f)); 47 | } else if ((uch >= SURROGATE_LEAD_FIRST) && 48 | (uch <= SURROGATE_TRAIL_LAST)) { 49 | // Half a surrogate pair 50 | i++; 51 | unsigned int xch = 0x10000 + ((uch & 0x3ff) << 10) + (uptr[i] & 0x3ff); 52 | putf[k++] = static_cast(0xF0 | (xch >> 18)); 53 | putf[k++] = static_cast(0x80 | ((xch >> 12) & 0x3f)); 54 | putf[k++] = static_cast(0x80 | ((xch >> 6) & 0x3f)); 55 | putf[k++] = static_cast(0x80 | (xch & 0x3f)); 56 | } else { 57 | putf[k++] = static_cast(0xE0 | (uch >> 12)); 58 | putf[k++] = static_cast(0x80 | ((uch >> 6) & 0x3f)); 59 | putf[k++] = static_cast(0x80 | (uch & 0x3f)); 60 | } 61 | i++; 62 | } 63 | putf[len] = '\0'; 64 | } 65 | 66 | unsigned int UTF8CharLength(unsigned char ch) { 67 | if (ch < 0x80) { 68 | return 1; 69 | } else if (ch < 0x80 + 0x40 + 0x20) { 70 | return 2; 71 | } else if (ch < 0x80 + 0x40 + 0x20 + 0x10) { 72 | return 3; 73 | } else { 74 | return 4; 75 | } 76 | } 77 | 78 | unsigned int UTF16Length(const char *s, unsigned int len) { 79 | unsigned int ulen = 0; 80 | unsigned int charLen; 81 | for (unsigned int i=0; i(s[i]); 83 | if (ch < 0x80) { 84 | charLen = 1; 85 | } else if (ch < 0x80 + 0x40 + 0x20) { 86 | charLen = 2; 87 | } else if (ch < 0x80 + 0x40 + 0x20 + 0x10) { 88 | charLen = 3; 89 | } else { 90 | charLen = 4; 91 | ulen++; 92 | } 93 | i += charLen; 94 | ulen++; 95 | } 96 | return ulen; 97 | } 98 | 99 | unsigned int UTF16FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen) { 100 | unsigned int ui=0; 101 | const unsigned char *us = reinterpret_cast(s); 102 | unsigned int i=0; 103 | while ((i((ch & 0x1F) << 6); 109 | ch = us[i++]; 110 | tbuf[ui] = static_cast(tbuf[ui] + (ch & 0x7F)); 111 | } else if (ch < 0x80 + 0x40 + 0x20 + 0x10) { 112 | tbuf[ui] = static_cast((ch & 0xF) << 12); 113 | ch = us[i++]; 114 | tbuf[ui] = static_cast(tbuf[ui] + ((ch & 0x7F) << 6)); 115 | ch = us[i++]; 116 | tbuf[ui] = static_cast(tbuf[ui] + (ch & 0x7F)); 117 | } else { 118 | // Outside the BMP so need two surrogates 119 | int val = (ch & 0x7) << 18; 120 | ch = us[i++]; 121 | val += (ch & 0x3F) << 12; 122 | ch = us[i++]; 123 | val += (ch & 0x3F) << 6; 124 | ch = us[i++]; 125 | val += (ch & 0x3F); 126 | tbuf[ui] = static_cast(((val - 0x10000) >> 10) + SURROGATE_LEAD_FIRST); 127 | ui++; 128 | tbuf[ui] = static_cast((val & 0x3ff) + SURROGATE_TRAIL_FIRST); 129 | } 130 | ui++; 131 | } 132 | return ui; 133 | } 134 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldUniConversion.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file UniConversion.h 3 | ** Functions to handle UTF-8 and UTF-16 strings. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen); 9 | void UTF8FromUTF16(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len); 10 | unsigned int UTF8CharLength(unsigned char ch); 11 | unsigned int UTF16Length(const char *s, unsigned int len); 12 | unsigned int UTF16FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen); 13 | 14 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldWindowAccessor.cxx: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file WindowAccessor.cxx 3 | ** Rapid easy access to contents of a Scintilla. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #define SCI_NAMESPACE 14 | 15 | #include "OldPlatform.h" 16 | 17 | #include "OldPropSet.h" 18 | #include "OldAccessor.h" 19 | #include "OldWindowAccessor.h" 20 | #include "OldScintilla.h" 21 | 22 | #ifdef SCI_NAMESPACE 23 | using namespace Scintilla; 24 | #endif 25 | 26 | WindowAccessor::~WindowAccessor() { 27 | } 28 | 29 | bool WindowAccessor::InternalIsLeadByte(char ch) { 30 | if (SC_CP_UTF8 == codePage) 31 | // For lexing, all characters >= 0x80 are treated the 32 | // same so none is considered a lead byte. 33 | return false; 34 | else 35 | return Platform::IsDBCSLeadByte(codePage, ch); 36 | } 37 | 38 | void WindowAccessor::Fill(int position) { 39 | if (lenDoc == -1) 40 | lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0); 41 | startPos = position - slopSize; 42 | if (startPos + bufferSize > lenDoc) 43 | startPos = lenDoc - bufferSize; 44 | if (startPos < 0) 45 | startPos = 0; 46 | endPos = startPos + bufferSize; 47 | if (endPos > lenDoc) 48 | endPos = lenDoc; 49 | 50 | Sci_TextRange tr = {{startPos, endPos}, buf}; 51 | Platform::SendScintillaPointer(id, SCI_GETTEXTRANGE, 0, &tr); 52 | } 53 | 54 | bool WindowAccessor::Match(int pos, const char *s) { 55 | for (int i=0; *s; i++) { 56 | if (*s != SafeGetCharAt(pos+i)) 57 | return false; 58 | s++; 59 | } 60 | return true; 61 | } 62 | 63 | char WindowAccessor::StyleAt(int position) { 64 | return static_cast(Platform::SendScintilla( 65 | id, SCI_GETSTYLEAT, position, 0)); 66 | } 67 | 68 | int WindowAccessor::GetLine(int position) { 69 | return Platform::SendScintilla(id, SCI_LINEFROMPOSITION, position, 0); 70 | } 71 | 72 | int WindowAccessor::LineStart(int line) { 73 | return Platform::SendScintilla(id, SCI_POSITIONFROMLINE, line, 0); 74 | } 75 | 76 | int WindowAccessor::LevelAt(int line) { 77 | return Platform::SendScintilla(id, SCI_GETFOLDLEVEL, line, 0); 78 | } 79 | 80 | int WindowAccessor::Length() { 81 | if (lenDoc == -1) 82 | lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0); 83 | return lenDoc; 84 | } 85 | 86 | int WindowAccessor::GetLineState(int line) { 87 | return Platform::SendScintilla(id, SCI_GETLINESTATE, line); 88 | } 89 | 90 | int WindowAccessor::SetLineState(int line, int state) { 91 | return Platform::SendScintilla(id, SCI_SETLINESTATE, line, state); 92 | } 93 | 94 | void WindowAccessor::StartAt(unsigned int start, char chMask) { 95 | Platform::SendScintilla(id, SCI_STARTSTYLING, start, chMask); 96 | } 97 | 98 | void WindowAccessor::StartSegment(unsigned int pos) { 99 | startSeg = pos; 100 | } 101 | 102 | void WindowAccessor::ColourTo(unsigned int pos, int chAttr) { 103 | // Only perform styling if non empty range 104 | if (pos != startSeg - 1) { 105 | if (pos < startSeg) { 106 | Platform::DebugPrintf("Bad colour positions %d - %d\n", startSeg, pos); 107 | } 108 | 109 | if (validLen + (pos - startSeg + 1) >= bufferSize) 110 | Flush(); 111 | if (validLen + (pos - startSeg + 1) >= bufferSize) { 112 | // Too big for buffer so send directly 113 | Platform::SendScintilla(id, SCI_SETSTYLING, pos - startSeg + 1, chAttr); 114 | } else { 115 | if (chAttr != chWhile) 116 | chFlags = 0; 117 | chAttr |= chFlags; 118 | for (unsigned int i = startSeg; i <= pos; i++) { 119 | styleBuf[validLen++] = static_cast(chAttr); 120 | } 121 | } 122 | } 123 | startSeg = pos+1; 124 | } 125 | 126 | void WindowAccessor::SetLevel(int line, int level) { 127 | Platform::SendScintilla(id, SCI_SETFOLDLEVEL, line, level); 128 | } 129 | 130 | void WindowAccessor::Flush() { 131 | startPos = extremePosition; 132 | lenDoc = -1; 133 | if (validLen > 0) { 134 | Platform::SendScintillaPointer(id, SCI_SETSTYLINGEX, validLen, 135 | styleBuf); 136 | validLen = 0; 137 | } 138 | } 139 | 140 | int WindowAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) { 141 | int end = Length(); 142 | int spaceFlags = 0; 143 | 144 | // Determines the indentation level of the current line and also checks for consistent 145 | // indentation compared to the previous line. 146 | // Indentation is judged consistent when the indentation whitespace of each line lines 147 | // the same or the indentation of one line is a prefix of the other. 148 | 149 | int pos = LineStart(line); 150 | char ch = (*this)[pos]; 151 | int indent = 0; 152 | bool inPrevPrefix = line > 0; 153 | int posPrev = inPrevPrefix ? LineStart(line-1) : 0; 154 | while ((ch == ' ' || ch == '\t') && (pos < end)) { 155 | if (inPrevPrefix) { 156 | char chPrev = (*this)[posPrev++]; 157 | if (chPrev == ' ' || chPrev == '\t') { 158 | if (chPrev != ch) 159 | spaceFlags |= wsInconsistent; 160 | } else { 161 | inPrevPrefix = false; 162 | } 163 | } 164 | if (ch == ' ') { 165 | spaceFlags |= wsSpace; 166 | indent++; 167 | } else { // Tab 168 | spaceFlags |= wsTab; 169 | if (spaceFlags & wsSpace) 170 | spaceFlags |= wsSpaceTab; 171 | indent = (indent / 8 + 1) * 8; 172 | } 173 | ch = (*this)[++pos]; 174 | } 175 | 176 | *flags = spaceFlags; 177 | indent += SC_FOLDLEVELBASE; 178 | // if completely empty line or the start of a comment... 179 | if (isspace(ch) || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos))) 180 | return indent | SC_FOLDLEVELWHITEFLAG; 181 | else 182 | return indent; 183 | } 184 | 185 | void WindowAccessor::IndicatorFill(int start, int end, int indicator, int value) { 186 | Platform::SendScintilla(id, SCI_SETINDICATORCURRENT, indicator); 187 | if (value) { 188 | Platform::SendScintilla(id, SCI_SETINDICATORVALUE, value); 189 | Platform::SendScintilla(id, SCI_INDICATORFILLRANGE, start, end - start); 190 | } else { 191 | Platform::SendScintilla(id, SCI_INDICATORCLEARRANGE, start, end - start); 192 | } 193 | } 194 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldWindowAccessor.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file WindowAccessor.h 3 | ** Implementation of BufferAccess and StylingAccess on a Scintilla 4 | ** rapid easy access to contents of a Scintilla. 5 | **/ 6 | // Copyright 1998-2001 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #ifdef SCI_NAMESPACE 10 | namespace Scintilla { 11 | #endif 12 | 13 | /** 14 | */ 15 | 16 | class WindowAccessor : public Accessor { 17 | // Private so WindowAccessor objects can not be copied 18 | WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {} 19 | WindowAccessor &operator=(const WindowAccessor &) { return *this; } 20 | protected: 21 | WindowID id; 22 | PropertyGet &props; 23 | int lenDoc; 24 | 25 | char styleBuf[bufferSize]; 26 | int validLen; 27 | char chFlags; 28 | char chWhile; 29 | unsigned int startSeg; 30 | 31 | bool InternalIsLeadByte(char ch); 32 | void Fill(int position); 33 | public: 34 | WindowAccessor(WindowID id_, PropertyGet &props_) : 35 | Accessor(), id(id_), props(props_), 36 | lenDoc(-1), validLen(0), chFlags(0), chWhile(0) { 37 | } 38 | ~WindowAccessor(); 39 | bool Match(int pos, const char *s); 40 | char StyleAt(int position); 41 | int GetLine(int position); 42 | int LineStart(int line); 43 | int LevelAt(int line); 44 | int Length(); 45 | void Flush(); 46 | int GetLineState(int line); 47 | int SetLineState(int line, int state); 48 | int GetPropertyInt(const char *key, int defaultValue=0) { 49 | return props.GetInt(key, defaultValue); 50 | } 51 | char *GetProperties() { 52 | return props.ToString(); 53 | } 54 | 55 | void StartAt(unsigned int start, char chMask=31); 56 | void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; } 57 | unsigned int GetStartSegment() { return startSeg; } 58 | void StartSegment(unsigned int pos); 59 | void ColourTo(unsigned int pos, int chAttr); 60 | void SetLevel(int line, int level); 61 | int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); 62 | void IndicatorFill(int start, int end, int indicator, int value); 63 | }; 64 | 65 | #ifdef SCI_NAMESPACE 66 | } 67 | #endif 68 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldXPM.cxx: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file XPM.cxx 3 | ** Define a class that holds data in the X Pixmap (XPM) format. 4 | **/ 5 | // Copyright 1998-2003 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #include 9 | #include 10 | 11 | #define SCI_NAMESPACE 12 | 13 | #include "OldPlatform.h" 14 | 15 | #include "OldXPM.h" 16 | 17 | #ifdef SCI_NAMESPACE 18 | using namespace Scintilla; 19 | #endif 20 | 21 | static const char *NextField(const char *s) { 22 | // In case there are leading spaces in the string 23 | while (*s && *s == ' ') { 24 | s++; 25 | } 26 | while (*s && *s != ' ') { 27 | s++; 28 | } 29 | while (*s && *s == ' ') { 30 | s++; 31 | } 32 | return s; 33 | } 34 | 35 | // Data lines in XPM can be terminated either with NUL or " 36 | static size_t MeasureLength(const char *s) { 37 | size_t i = 0; 38 | while (s[i] && (s[i] != '\"')) 39 | i++; 40 | return i; 41 | } 42 | 43 | ColourAllocated XPM::ColourFromCode(int ch) const { 44 | return colourCodeTable[ch]->allocated; 45 | #ifdef SLOW 46 | for (int i=0; iFillRectangle(rc, ColourFromCode(code)); 59 | } 60 | } 61 | 62 | XPM::XPM(const char *textForm) : 63 | data(0), codes(0), colours(0), lines(0) { 64 | Init(textForm); 65 | } 66 | 67 | XPM::XPM(const char *const *linesForm) : 68 | data(0), codes(0), colours(0), lines(0) { 69 | Init(linesForm); 70 | } 71 | 72 | XPM::~XPM() { 73 | Clear(); 74 | } 75 | 76 | void XPM::Init(const char *textForm) { 77 | Clear(); 78 | // Test done is two parts to avoid possibility of overstepping the memory 79 | // if memcmp implemented strangely. Must be 4 bytes at least at destination. 80 | if ((0 == memcmp(textForm, "/* X", 4)) && (0 == memcmp(textForm, "/* XPM */", 9))) { 81 | // Build the lines form out of the text form 82 | const char **linesForm = LinesFormFromTextForm(textForm); 83 | if (linesForm != 0) { 84 | Init(linesForm); 85 | delete []linesForm; 86 | } 87 | } else { 88 | // It is really in line form 89 | Init(reinterpret_cast(textForm)); 90 | } 91 | } 92 | 93 | void XPM::Init(const char *const *linesForm) { 94 | Clear(); 95 | height = 1; 96 | width = 1; 97 | nColours = 1; 98 | data = NULL; 99 | codeTransparent = ' '; 100 | codes = NULL; 101 | colours = NULL; 102 | lines = NULL; 103 | if (!linesForm) 104 | return; 105 | 106 | const char *line0 = linesForm[0]; 107 | width = atoi(line0); 108 | line0 = NextField(line0); 109 | height = atoi(line0); 110 | line0 = NextField(line0); 111 | nColours = atoi(line0); 112 | line0 = NextField(line0); 113 | if (atoi(line0) != 1) { 114 | // Only one char per pixel is supported 115 | return; 116 | } 117 | codes = new char[nColours]; 118 | colours = new ColourPair[nColours]; 119 | 120 | int strings = 1+height+nColours; 121 | lines = new char *[strings]; 122 | size_t allocation = 0; 123 | for (int i=0; i(codes[c])] = &(colours[c]); 151 | } 152 | } 153 | 154 | void XPM::Clear() { 155 | delete []data; 156 | data = 0; 157 | delete []codes; 158 | codes = 0; 159 | delete []colours; 160 | colours = 0; 161 | delete []lines; 162 | lines = 0; 163 | } 164 | 165 | void XPM::RefreshColourPalette(Palette &pal, bool want) { 166 | if (!data || !codes || !colours || !lines) { 167 | return; 168 | } 169 | for (int i=0; i= strings) { 229 | break; // Bad height or number of colors! 230 | } 231 | if ((countQuotes & 1) == 0) { 232 | linesForm[countQuotes / 2] = textForm + j + 1; 233 | } 234 | countQuotes++; 235 | } 236 | } 237 | if (textForm[j] == '\0' || countQuotes / 2 > strings) { 238 | // Malformed XPM! Height + number of colors too high or too low 239 | delete []linesForm; 240 | linesForm = 0; 241 | } 242 | return linesForm; 243 | } 244 | 245 | // In future, may want to minimize search time by sorting and using a binary search. 246 | 247 | XPMSet::XPMSet() : set(0), len(0), maximum(0), height(-1), width(-1) { 248 | } 249 | 250 | XPMSet::~XPMSet() { 251 | Clear(); 252 | } 253 | 254 | void XPMSet::Clear() { 255 | for (int i = 0; i < len; i++) { 256 | delete set[i]; 257 | } 258 | delete []set; 259 | set = 0; 260 | len = 0; 261 | maximum = 0; 262 | height = -1; 263 | width = -1; 264 | } 265 | 266 | void XPMSet::Add(int id, const char *textForm) { 267 | // Invalidate cached dimensions 268 | height = -1; 269 | width = -1; 270 | 271 | // Replace if this id already present 272 | for (int i = 0; i < len; i++) { 273 | if (set[i]->GetId() == id) { 274 | set[i]->Init(textForm); 275 | set[i]->CopyDesiredColours(); 276 | return; 277 | } 278 | } 279 | 280 | // Not present, so add to end 281 | XPM *pxpm = new XPM(textForm); 282 | if (pxpm) { 283 | pxpm->SetId(id); 284 | pxpm->CopyDesiredColours(); 285 | if (len == maximum) { 286 | maximum += 64; 287 | XPM **setNew = new XPM *[maximum]; 288 | for (int i = 0; i < len; i++) { 289 | setNew[i] = set[i]; 290 | } 291 | delete []set; 292 | set = setNew; 293 | } 294 | set[len] = pxpm; 295 | len++; 296 | } 297 | } 298 | 299 | XPM *XPMSet::Get(int id) { 300 | for (int i = 0; i < len; i++) { 301 | if (set[i]->GetId() == id) { 302 | return set[i]; 303 | } 304 | } 305 | return 0; 306 | } 307 | 308 | int XPMSet::GetHeight() { 309 | if (height < 0) { 310 | for (int i = 0; i < len; i++) { 311 | if (height < set[i]->GetHeight()) { 312 | height = set[i]->GetHeight(); 313 | } 314 | } 315 | } 316 | return (height > 0) ? height : 0; 317 | } 318 | 319 | int XPMSet::GetWidth() { 320 | if (width < 0) { 321 | for (int i = 0; i < len; i++) { 322 | if (width < set[i]->GetWidth()) { 323 | width = set[i]->GetWidth(); 324 | } 325 | } 326 | } 327 | return (width > 0) ? width : 0; 328 | } 329 | -------------------------------------------------------------------------------- /sourcecode/legacylib/OldXPM.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file XPM.h 3 | ** Define a class that holds data in the X Pixmap (XPM) format. 4 | **/ 5 | // Copyright 1998-2003 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef XPM_H 9 | #define XPM_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | /** 16 | * Hold a pixmap in XPM format. 17 | */ 18 | class XPM { 19 | int pid; // Assigned by container 20 | int height; 21 | int width; 22 | int nColours; 23 | char *data; 24 | char codeTransparent; 25 | char *codes; 26 | ColourPair *colours; 27 | ColourAllocated ColourFromCode(int ch) const; 28 | void FillRun(Surface *surface, int code, int startX, int y, int x); 29 | char **lines; 30 | ColourPair *colourCodeTable[256]; 31 | public: 32 | XPM(const char *textForm); 33 | XPM(const char *const *linesForm); 34 | ~XPM(); 35 | void Init(const char *textForm); 36 | void Init(const char *const *linesForm); 37 | void Clear(); 38 | /// Similar to same named method in ViewStyle: 39 | void RefreshColourPalette(Palette &pal, bool want); 40 | /// No palette used, so just copy the desired colours to the allocated colours 41 | void CopyDesiredColours(); 42 | /// Decompose image into runs and use FillRectangle for each run 43 | void Draw(Surface *surface, PRectangle &rc); 44 | char **InLinesForm() { return lines; } 45 | void SetId(int pid_) { pid = pid_; } 46 | int GetId() const { return pid; } 47 | int GetHeight() const { return height; } 48 | int GetWidth() const { return width; } 49 | static const char **LinesFormFromTextForm(const char *textForm); 50 | }; 51 | 52 | /** 53 | * A collection of pixmaps indexed by integer id. 54 | */ 55 | class XPMSet { 56 | XPM **set; ///< The stored XPMs. 57 | int len; ///< Current number of XPMs. 58 | int maximum; ///< Current maximum number of XPMs, increased by steps if reached. 59 | int height; ///< Memorize largest height of the set. 60 | int width; ///< Memorize largest width of the set. 61 | public: 62 | XPMSet(); 63 | ~XPMSet(); 64 | /// Remove all XPMs. 65 | void Clear(); 66 | /// Add a XPM. 67 | void Add(int id, const char *textForm); 68 | /// Get XPM by id. 69 | XPM *Get(int id); 70 | /// Give the largest height of the set. 71 | int GetHeight(); 72 | /// Give the largest width of the set. 73 | int GetWidth(); 74 | }; 75 | 76 | #ifdef SCI_NAMESPACE 77 | } 78 | #endif 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /sourcecode/src/Legacy.cpp: -------------------------------------------------------------------------------- 1 | #include "Legacy.h" 2 | 3 | void LexOrFold(bool foldOrLex, unsigned int startPos, unsigned int length, int initStyle, 4 | char *words[], WindowID window, char *props) 5 | { 6 | // Create and initialize the WindowAccessor (including contained PropSet) 7 | PropSetSimple ps; 8 | ps.SetMultiple(props); 9 | WindowAccessor wa(window, ps); 10 | 11 | // Create and initialize WordList(s). 12 | // If you have an extremely large word file, or lots of styling rules you may want to speed 13 | // up processing by storing the wordlists instead of reprocessing them on each call. 14 | int nWL = 0; 15 | for (; words[nWL]; nWL++) ; // count # of WordList PTRs needed 16 | WordList** wl = new WordList* [nWL + 1];// alloc WordList PTRs 17 | int i = 0; 18 | for (; i < nWL; i++) { 19 | wl[i] = new WordList(); // (works or THROWS bad_alloc EXCEPTION) 20 | wl[i]->Set(words[i]); 21 | } 22 | wl[i] = 0; 23 | 24 | // Call the internal folding and styling functions. 25 | // foldOrLex is false for lex and true for fold 26 | if (foldOrLex) { 27 | 28 | // This is a nice helpful routine to back up a line to fix broken folds. 29 | int lineCurrent = wa.GetLine(startPos); 30 | if (lineCurrent > 0) { 31 | lineCurrent--; 32 | int newStartPos = wa.LineStart(lineCurrent); 33 | length += startPos - newStartPos; 34 | startPos = newStartPos; 35 | initStyle = 0; 36 | if (startPos > 0) { 37 | initStyle = wa.StyleAt(startPos - 1); 38 | } 39 | } 40 | 41 | Fold_Doc(startPos, length, initStyle, wl, wa); 42 | 43 | } 44 | else { 45 | 46 | // You may want to put a routine here to backtrack past leaking styles, typically 47 | // multiline styles, or just put such logic in the Colour_Doc function itself. Just 48 | // be sure to do it prior to creating your Style Context. 49 | 50 | Colourise_Doc(startPos, length, initStyle, wl, wa); 51 | 52 | } 53 | 54 | // The flush function is what actually finalizes settings the styles you just coloured. 55 | wa.Flush(); 56 | 57 | // Clean up the wordlists before leaving. 58 | for (i = nWL - 1; i >= 0; i--) 59 | delete wl[i]; 60 | delete [] wl; 61 | } 62 | 63 | void __stdcall NppLex(unsigned int lexer, unsigned int startPos, int length, int initStyle, 64 | char *words[], WindowID window, char *props) 65 | { 66 | try 67 | { 68 | LexOrFold(0, startPos, length, initStyle, words, window, props); 69 | } catch (...) { 70 | } 71 | } 72 | void __stdcall NppFold(unsigned int lexer, unsigned int startPos, int length, int initStyle, 73 | char *words[], WindowID window, char *props) 74 | { 75 | try 76 | { 77 | LexOrFold(1, startPos, length, initStyle, words, window, props); 78 | } catch (...) { 79 | } 80 | } 81 | 82 | // Extended to accept accented characters 83 | static inline bool IsAWordChar(int ch) { 84 | return ch >= 0x80 || 85 | (isalnum(ch) || ch == '_'); 86 | } 87 | 88 | static inline bool IsLuaOperator(int ch) { 89 | if (ch >= 0x80 || isalnum(ch)) { 90 | return false; 91 | } 92 | 93 | if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || 94 | ch == '(' || ch == ')' || ch == '=' || 95 | ch == '{' || ch == '}' || ch == '~' || 96 | /*ch == '[' ||*/ ch == ']' || ch == ';' || 97 | ch == '<' || ch == '>' || ch == ',' || 98 | /*ch == '.' ||*/ ch == '^' || ch == '%' || //ch == ':' || 99 | ch == '#' || ch == '&' || ch == '|' || 100 | ch == '!') { 101 | return true; 102 | } 103 | return false; 104 | } 105 | 106 | // Test for [=[ ... ]=] delimiters, returns 0 if it's only a [ or ], 107 | // return 1 for [[ or ]], returns >=2 for [=[ or ]=] and so on. 108 | // The maximum number of '=' characters allowed is 254. 109 | static int LongDelimCheck(StyleContext &sc) { 110 | int sep = 1; 111 | while (sc.GetRelative(sep) == '=' && sep < 0xFF) 112 | sep++; 113 | if (sc.GetRelative(sep) == sc.ch) 114 | return sep; 115 | return 0; 116 | } 117 | 118 | 119 | // <--- Colourise ---> 120 | void Colourise_Doc(unsigned int startPos, unsigned int length, int initStyle, WordList *keywordlists[], Accessor &styler) 121 | { 122 | WordList &keywords0 = *keywordlists[0]; 123 | WordList &keywords1 = *keywordlists[1]; 124 | WordList &keywords2 = *keywordlists[2]; 125 | WordList &keywords3 = *keywordlists[3]; 126 | WordList &keywords4 = *keywordlists[4]; 127 | WordList &keywords5 = *keywordlists[5]; 128 | WordList &keywords6 = *keywordlists[6]; 129 | WordList &keywords7 = *keywordlists[7]; 130 | WordList &keywords8 = *keywordlists[8]; 131 | 132 | int currentLine = styler.GetLine(startPos); 133 | int sepCount = 0; 134 | if (initStyle == LITERALSTRING || initStyle == LUA_COMMENT) { 135 | sepCount = styler.GetLineState(currentLine - 1) & 0xFF; 136 | } 137 | 138 | // Do not leak onto next line 139 | if (initStyle == STRINGEOL || initStyle == LUA_COMMENTLINE || initStyle == CPP_COMMENTLINE) { 140 | initStyle = DEFAULT; 141 | } 142 | 143 | StyleContext sc(startPos, length, initStyle, styler); 144 | for (; sc.More(); sc.Forward()) { 145 | if (sc.atLineEnd) { 146 | // Update the line state, so it can be seen by next line 147 | currentLine = styler.GetLine(sc.currentPos); 148 | switch (sc.state) { 149 | case LITERALSTRING: 150 | case LUA_COMMENT: 151 | // Inside a literal string or block comment, we set the line state 152 | styler.SetLineState(currentLine, sepCount); 153 | break; 154 | default: 155 | // Reset the line state 156 | styler.SetLineState(currentLine, 0); 157 | break; 158 | } 159 | } 160 | 161 | // Handle string line continuation 162 | if ((sc.state == STRING || sc.state == CHARACTER) && 163 | sc.ch == '\\') { 164 | if (sc.chNext == '\n' || sc.chNext == '\r') { 165 | sc.Forward(); 166 | if (sc.ch == '\r' && sc.chNext == '\n') { 167 | sc.Forward(); 168 | } 169 | continue; 170 | } 171 | } 172 | 173 | // Determine if the current state should terminate. 174 | if (sc.state == OPERATOR || sc.state == NUMBER) { 175 | sc.SetState(DEFAULT); 176 | } else if (sc.state == IDENTIFIER) { 177 | if (!IsAWordChar(sc.ch) || (sc.currentPos+1 == startPos + length)) { 178 | if (IsAWordChar(sc.ch)) { 179 | sc.Forward(); // Checks words at the end of the document. 180 | } 181 | char s[100]; 182 | sc.GetCurrent(s, sizeof(s)); 183 | if (keywords0.InList(s)) { 184 | sc.ChangeState(WORD0); 185 | } else if (keywords1.InList(s)) { 186 | sc.ChangeState(WORD1); 187 | } else if (keywords2.InList(s)) { 188 | sc.ChangeState(WORD2); 189 | } else if (keywords5.InList(s)) { 190 | sc.ChangeState(WORD5); 191 | } else if (keywords8.InList(s)) { 192 | sc.ChangeState(WORD8); 193 | } 194 | sc.SetState(DEFAULT); 195 | } 196 | } else if (sc.state == LUA_COMMENTLINE || sc.state == CPP_COMMENTLINE) { 197 | if (sc.atLineEnd) { 198 | sc.ForwardSetState(DEFAULT); 199 | } 200 | } else if (sc.state == STRING) { 201 | if (sc.ch == '\\') { 202 | if (sc.chNext == '\"' || sc.chNext == '\\') { 203 | sc.Forward(); 204 | } 205 | } else if (sc.ch == '\"') { 206 | sc.ForwardSetState(DEFAULT); 207 | } else if (sc.atLineEnd) { 208 | sc.ChangeState(STRINGEOL); 209 | sc.ForwardSetState(DEFAULT); 210 | } 211 | } else if (sc.state == CHARACTER) { 212 | if (sc.ch == '\\') { 213 | if (sc.chNext == '\'' || sc.chNext == '\\') { 214 | sc.Forward(); 215 | } 216 | } else if (sc.ch == '\'') { 217 | sc.ForwardSetState(DEFAULT); 218 | } else if (sc.atLineEnd) { 219 | sc.ChangeState(STRINGEOL); 220 | sc.ForwardSetState(DEFAULT); 221 | } 222 | } else if (sc.state == LITERALSTRING || sc.state == LUA_COMMENT) { 223 | if (sc.ch == ']') { 224 | int sep = LongDelimCheck(sc); 225 | if (sep == sepCount) { 226 | sc.Forward(sep); 227 | sc.ForwardSetState(DEFAULT); 228 | } 229 | } 230 | } else if (sc.state == CPP_COMMENT) { 231 | if (sc.Match('*', '/')) { 232 | sc.Forward(); 233 | sc.ForwardSetState(DEFAULT); 234 | } 235 | } else { 236 | sc.SetState(DEFAULT); 237 | } 238 | 239 | // Determine if a new state should be entered. 240 | if (sc.state == DEFAULT) { 241 | if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { 242 | sc.SetState(NUMBER); 243 | if (sc.ch == '0' && (sc.chNext == 'x' || sc.chNext == 'X')) { 244 | int j = 1; 245 | while (IsADigit(sc.GetRelative(j+1), 16)) { 246 | j++; 247 | } 248 | sc.Forward(j); 249 | } else { 250 | int j = 0; 251 | bool hitDot(false); 252 | bool hitE(false); 253 | int ch = sc.ch; 254 | int chNext = sc.chNext; 255 | while (IsADigit(ch) || (ch == '.' && !hitDot && !hitE) || 256 | ((ch == 'e' || ch == 'E') && !hitE && (IsADigit(chNext) || 257 | ((chNext == '-' || chNext == '+') && IsADigit(sc.GetRelative(j+2)))))) { 258 | if (ch == '.') { 259 | hitDot = true; 260 | } else if (ch == 'e' || ch == 'E') { 261 | hitE = true; 262 | j++; 263 | if (chNext == '-' || chNext == '+') { 264 | j++; 265 | } 266 | chNext = sc.GetRelative(j+1); 267 | } 268 | j++; 269 | ch = chNext; 270 | chNext = sc.GetRelative(j+1); 271 | } 272 | sc.Forward(j-1); 273 | } 274 | } else if (sc.ch == ':' || sc.ch == '.') { 275 | sc.SetState(OPERATOR); 276 | if (IsAWordChar(sc.chNext) || isspace(sc.chNext)) { 277 | int j = 1; 278 | int ch = sc.chNext; 279 | while((sc.currentPos + j < startPos + length) && isspace(ch)) { 280 | ch = sc.GetRelative(++j); 281 | } 282 | if (IsAWordChar(ch)) { 283 | int i = 0; 284 | char s[101]; 285 | while (i < 100 && IsAWordChar(ch)) { 286 | s[i++] = ch; 287 | ch = sc.GetRelative(++j); 288 | } 289 | s[i++] = '\0'; 290 | if (keywords7.InList(s)) { 291 | sc.Forward(j-i+1); 292 | sc.SetState(WORD7); 293 | } 294 | if (sc.state != OPERATOR) { 295 | sc.Forward(i-2); 296 | } 297 | } 298 | } 299 | } else if (IsAWordChar(sc.ch)) { 300 | sc.SetState(IDENTIFIER); 301 | int j = 0; 302 | int i = 0; 303 | char s[101]; 304 | bool finished = false; 305 | int ch = sc.ch; 306 | 307 | while (i < 100 && (sc.currentPos + j < startPos + length) && !finished && 308 | (IsAWordChar(ch) || isspace(ch) || (ch == '.' || ch == ':'))) { 309 | if (!IsAWordChar(ch)) { 310 | while((sc.currentPos + j < startPos + length) && isspace(ch)) { 311 | ch = sc.GetRelative(++j); 312 | } 313 | if (i < 100 && (ch == '.' || ch == ':')) { 314 | s[i++] = ch; 315 | ch = sc.GetRelative(++j); 316 | while((sc.currentPos + j < startPos + length) && isspace(ch)) { 317 | ch = sc.GetRelative(++j); 318 | } 319 | while(i < 100 && IsAWordChar(ch)) { 320 | s[i++] = ch; 321 | ch = sc.GetRelative(++j); 322 | } 323 | s[i++] = '\0'; 324 | if (keywords3.InList(s)) { 325 | sc.ChangeState(WORD3); 326 | } else if (keywords4.InList(s)) { 327 | sc.ChangeState(WORD4); 328 | } else if (keywords6.InList(s)) { 329 | sc.ChangeState(WORD6); 330 | } 331 | if (sc.state != IDENTIFIER) { 332 | sc.Forward(j-1); 333 | } 334 | } 335 | 336 | finished = true; 337 | } else { 338 | s[i++] = ch; 339 | ch = sc.GetRelative(++j); 340 | } 341 | } 342 | } else if (sc.ch == '\"') { 343 | sc.SetState(STRING); 344 | } else if (sc.ch == '\'') { 345 | sc.SetState(CHARACTER); 346 | } else if (sc.ch == '[') { 347 | sepCount = LongDelimCheck(sc); 348 | if (sepCount == 0) { 349 | sc.SetState(OPERATOR); 350 | } else { 351 | sc.SetState(LITERALSTRING); 352 | sc.Forward(sepCount); 353 | } 354 | } else if (sc.Match('-', '-')) { 355 | sc.SetState(LUA_COMMENTLINE); 356 | if (sc.Match("--[")) { 357 | sc.Forward(2); 358 | sepCount = LongDelimCheck(sc); 359 | if (sepCount > 0) { 360 | sc.ChangeState(LUA_COMMENT); 361 | sc.Forward(sepCount); 362 | } 363 | } else { 364 | sc.Forward(); 365 | } 366 | } else if (sc.Match('/', '/')) { 367 | sc.SetState(CPP_COMMENTLINE); 368 | sc.Forward(); 369 | } else if (sc.Match('/', '*')) { 370 | sc.SetState(CPP_COMMENT); 371 | sc.Forward(); 372 | } else if (IsLuaOperator(sc.ch)) { 373 | sc.SetState(OPERATOR); 374 | } 375 | } 376 | } 377 | sc.Complete(); 378 | } 379 | 380 | // <--- Fold ---> 381 | void Fold_Doc(unsigned int startPos, unsigned int length, int initStyle, WordList *[], Accessor &styler) 382 | { 383 | unsigned int lengthDoc = startPos + length; 384 | int visibleChars = 0; 385 | int lineCurrent = styler.GetLine(startPos); 386 | int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; 387 | int levelCurrent = levelPrev; 388 | char chNext = styler[startPos]; 389 | bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; 390 | int styleNext = styler.StyleAt(startPos); 391 | int style = initStyle; 392 | char s[10]; 393 | 394 | for (unsigned int i = startPos; i < lengthDoc; i++) { 395 | char ch = chNext; 396 | chNext = styler.SafeGetCharAt(i + 1); 397 | int stylePrev = style; 398 | style = styleNext; 399 | styleNext = styler.StyleAt(i + 1); 400 | bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); 401 | if (style == WORD0 && stylePrev != WORD0) { 402 | if (ch == 'i' || ch == 'd' || ch == 'f' || ch == 'e' || ch == 'r' || ch == 'u') { 403 | unsigned int j; 404 | for (j = 0; j < 8 && iswordchar(styler.SafeGetCharAt(i + j)); j++) { 405 | s[j] = styler[i + j]; 406 | } 407 | s[j] = '\0'; 408 | 409 | if ((strcmp(s, "if") == 0) || (strcmp(s, "do") == 0) || (strcmp(s, "function") == 0) || (strcmp(s, "repeat") == 0)) { 410 | levelCurrent++; 411 | } 412 | if ((strcmp(s, "end") == 0) || (strcmp(s, "until") == 0)) { 413 | levelCurrent--; 414 | } 415 | } 416 | } else if (style == OPERATOR) { 417 | if (ch == '{'){ 418 | levelCurrent++; 419 | } else if (ch == '}'){ 420 | levelCurrent--; 421 | } 422 | } else if ((style == LITERALSTRING || style == LUA_COMMENT || style == CPP_COMMENT) && 423 | !(stylePrev == LITERALSTRING || stylePrev == LUA_COMMENT || stylePrev == CPP_COMMENT) && 424 | (ch == '[' || ch == '/' || ch == '-')) { 425 | levelCurrent++; 426 | } else if ((style == LITERALSTRING || style == LUA_COMMENT || style == CPP_COMMENT) && 427 | !(styleNext == LITERALSTRING || styleNext == LUA_COMMENT || styleNext == CPP_COMMENT) && 428 | (ch == ']' || ch == '/')) { 429 | levelCurrent--; 430 | } else if (style == CPP_COMMENTLINE || style == LUA_COMMENTLINE) { 431 | if ((ch == '/' && chNext == '/') || (ch == '-' && chNext == '-')) { 432 | char chNext2 = styler.SafeGetCharAt(i + 2); 433 | if (chNext2 == '{') { 434 | levelCurrent++; 435 | } else if (chNext2 == '}') { 436 | levelCurrent--; 437 | } 438 | } 439 | } 440 | 441 | if (!isspacechar(ch)) { 442 | visibleChars++; 443 | } 444 | if (atEOL || (i == lengthDoc-1)) { 445 | int lev = levelPrev; 446 | if (visibleChars == 0 && foldCompact) { 447 | lev |= SC_FOLDLEVELWHITEFLAG; 448 | } 449 | if (levelCurrent > levelPrev) { 450 | lev |= SC_FOLDLEVELHEADERFLAG; 451 | } 452 | if (lev != styler.LevelAt(lineCurrent)) { 453 | styler.SetLevel(lineCurrent, lev); 454 | } 455 | lineCurrent++; 456 | levelPrev = levelCurrent; 457 | visibleChars = 0; 458 | } 459 | } 460 | char lastChar = styler.SafeGetCharAt(lengthDoc-1); 461 | if ((unsigned)styler.Length() == lengthDoc && (lastChar == '\n' || lastChar == '\r')) { 462 | styler.SetLevel(lineCurrent, levelCurrent); 463 | } 464 | } -------------------------------------------------------------------------------- /sourcecode/src/Legacy.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #define SCI_NAMESPACE 6 | 7 | #include "OldPlatform.h" 8 | 9 | #include "OldPropSet.h" 10 | #include "OldAccessor.h" 11 | #include "OldWindowAccessor.h" 12 | 13 | #include "OldPropSetSimple.h" 14 | #include "OldKeyWords.h" 15 | #include "OldStyleContext.h" 16 | #include "OldScintilla.h" 17 | 18 | using namespace Scintilla; 19 | 20 | const int DEFAULT = 0; 21 | 22 | const int LUA_COMMENT = 1; 23 | const int CPP_COMMENT = 2; 24 | const int LUA_COMMENTLINE = 3; 25 | const int CPP_COMMENTLINE = 4; 26 | 27 | const int NUMBER = 5; 28 | const int OPERATOR = 6; 29 | const int IDENTIFIER = 7; 30 | 31 | const int STRING = 8; 32 | const int CHARACTER = 9; 33 | const int STRINGEOL = 10; 34 | const int LITERALSTRING = 11; 35 | 36 | const int WORD0 = 20; 37 | const int WORD1 = 21; 38 | const int WORD2 = 22; 39 | const int WORD3 = 23; 40 | const int WORD4 = 24; 41 | const int WORD5 = 25; 42 | const int WORD6 = 26; 43 | const int WORD7 = 27; 44 | const int WORD8 = 28; 45 | 46 | void Colourise_Doc(unsigned int startPos, unsigned int length, int initStyle, WordList *keywordlists[], Accessor &styler); 47 | void Fold_Doc(unsigned int startPos, unsigned int length, int initStyle, WordList *[], Accessor &styler); 48 | -------------------------------------------------------------------------------- /sourcecode/src/N64C.cpp: -------------------------------------------------------------------------------- 1 | #include "N64C.h" 2 | 3 | #include "LexerBase.h" 4 | 5 | using namespace N64C; 6 | 7 | 8 | BOOL APIENTRY DllMain(HANDLE /*hModule*/, DWORD reasonForCall, LPVOID /*lpReserved*/) 9 | { 10 | switch (reasonForCall) 11 | { 12 | case DLL_PROCESS_ATTACH: 13 | 14 | /* Set function pointers */ 15 | pluginMenuItems[0]._pFunc = aboutDlg; 16 | 17 | /* Fill menu names */ 18 | generic_strncpy_s(pluginMenuItems[0]._itemName, nbChar, aboutMenuItem.c_str(), _TRUNCATE); 19 | 20 | /* Set shortcuts */ 21 | pluginMenuItems[0]._pShKey = NULL; 22 | 23 | pluginMenuItems[0]._cmdID = NULL; 24 | pluginMenuItems[0]._init2Check = false; 25 | 26 | break; 27 | case DLL_PROCESS_DETACH: 28 | break; 29 | } 30 | return TRUE; 31 | } 32 | 33 | #define EXT_LEXER_DECL __declspec( dllexport ) __stdcall 34 | 35 | extern "C" { 36 | 37 | #ifdef UNICODE 38 | __declspec(dllexport) BOOL isUnicode() { 39 | return TRUE; 40 | } 41 | #endif 42 | 43 | __declspec(dllexport) const TCHAR * getName() { return PLUGIN_NAME.c_str(); } 44 | __declspec(dllexport) void setInfo(NppData notpadPlusData){ nppData = notpadPlusData; } 45 | 46 | __declspec(dllexport) FuncItem * getFuncsArray(int *nbF) 47 | { 48 | *nbF = numPluginMenuItems; 49 | return pluginMenuItems; 50 | } 51 | 52 | __declspec(dllexport) void beNotified(SCNotification * /*notifyCode*/) {} 53 | __declspec(dllexport) LRESULT messageProc(UINT /*Message*/, WPARAM /*wParam*/, LPARAM /*lParam*/) { return TRUE; } 54 | 55 | 56 | } // End extern "C" 57 | 58 | int EXT_LEXER_DECL GetLexerCount() { return 1; } 59 | 60 | void EXT_LEXER_DECL GetLexerName(unsigned int /*index*/, char *name, int buflength) 61 | { 62 | *name = 0; 63 | if (buflength > 0) { 64 | strncpy_s(name, buflength, LEXER_NAME.c_str(), _TRUNCATE); 65 | } 66 | } 67 | 68 | void EXT_LEXER_DECL GetLexerStatusText(unsigned int /*Index*/, TCHAR *desc, int buflength) 69 | { 70 | if (buflength > 0) { 71 | generic_strncpy_s(desc, buflength, LEXER_STATUS_TEXT.c_str(), _TRUNCATE); 72 | } 73 | } 74 | 75 | LexerFactoryFunction EXT_LEXER_DECL GetLexerFactory(unsigned int index) { 76 | if (index == 0) 77 | return LexerN64C::LexerFactory; 78 | else 79 | return 0; 80 | } 81 | 82 | void N64C::aboutDlg() 83 | { 84 | ::MessageBox(nppData._nppHandle, 85 | TEXT("Nintendo 64 C Syntax Highlighter 1.3\n") 86 | TEXT("https://github.com/buu342/N64-SyntaxHighlighter\n\n"), 87 | TEXT("About"), 88 | MB_OK); 89 | 90 | } 91 | 92 | void SCI_METHOD LexerN64C::Lex(unsigned int startPos, int length, int initStyle, IDocument *pAccess) { 93 | try { 94 | Accessor astyler(pAccess, &props); 95 | Colourise_Doc(startPos, length, initStyle, keyWordLists, astyler); 96 | astyler.Flush(); 97 | } catch (...) { 98 | // Should not throw into caller as may be compiled with different compiler or options 99 | pAccess->SetErrorStatus(SC_STATUS_FAILURE); 100 | } 101 | } 102 | void SCI_METHOD LexerN64C::Fold(unsigned int startPos, int length, int initStyle, IDocument *pAccess) { 103 | try { 104 | Accessor astyler(pAccess, &props); 105 | Fold_Doc(startPos, length, initStyle, astyler); 106 | astyler.Flush(); 107 | } catch (...) { 108 | // Should not throw into caller as may be compiled with different compiler or options 109 | pAccess->SetErrorStatus(SC_STATUS_FAILURE); 110 | } 111 | } 112 | 113 | // Extended to accept accented characters 114 | static inline bool IsAWordChar(int ch) { 115 | return ch >= 0x80 || 116 | (isalnum(ch) || ch == '_'); 117 | } 118 | 119 | static inline bool IsCOperator(int ch) { 120 | if (ch >= 0x80 || isalnum(ch)) { 121 | return false; 122 | } 123 | 124 | if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || 125 | ch == '(' || ch == ')' || ch == '=' || 126 | ch == '{' || ch == '}' || ch == '~' || 127 | ch == '[' || ch == ']' || ch == ';' || 128 | ch == '<' || ch == '>' || ch == ',' || 129 | /*ch == '.' ||*/ ch == '^' || ch == '%' || //ch == ':' || 130 | ch == '#' || ch == '&' || ch == '|' || 131 | ch == '!') { 132 | return true; 133 | } 134 | return false; 135 | } 136 | 137 | // Test for [=[ ... ]=] delimiters, returns 0 if it's only a [ or ], 138 | // return 1 for [[ or ]], returns >=2 for [=[ or ]=] and so on. 139 | // The maximum number of '=' characters allowed is 254. 140 | static int LongDelimCheck(StyleContext &sc) { 141 | int sep = 1; 142 | while (sc.GetRelative(sep) == '=' && sep < 0xFF) 143 | sep++; 144 | if (sc.GetRelative(sep) == sc.ch) 145 | return sep; 146 | return 0; 147 | } 148 | 149 | 150 | // <--- Colourise ---> 151 | void N64C::Colourise_Doc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler) 152 | { 153 | WordList &keywords0 = *keywordlists[0]; 154 | WordList &keywords1 = *keywordlists[1]; 155 | WordList &keywords2 = *keywordlists[2]; 156 | WordList &keywords3 = *keywordlists[3]; 157 | WordList &keywords4 = *keywordlists[4]; 158 | WordList &keywords5 = *keywordlists[5]; 159 | WordList &keywords6 = *keywordlists[6]; 160 | WordList &keywords7 = *keywordlists[7]; 161 | WordList &keywords8 = *keywordlists[8]; 162 | 163 | int currentLine = styler.GetLine(startPos); 164 | int sepCount = 0; 165 | if (initStyle == PREPROCESSOR) { 166 | sepCount = styler.GetLineState(currentLine - 1) & 0xFF; 167 | } 168 | 169 | // Do not leak onto next line 170 | if (initStyle == STRINGEOL || initStyle == COMMENTLINE || initStyle == PREPROCEOL ) { 171 | initStyle = DEFAULT; 172 | } 173 | 174 | StyleContext sc(startPos, length, initStyle, styler); 175 | for (; sc.More(); sc.Forward()) { 176 | if (sc.atLineEnd) { 177 | // Update the line state, so it can be seen by next line 178 | currentLine = styler.GetLine(sc.currentPos); 179 | styler.SetLineState(currentLine, 0); 180 | } 181 | 182 | // Handle string line continuation 183 | if ((sc.state == STRING || sc.state == CHARACTER || sc.state == PREPROCESSOR) && 184 | sc.ch == '\\') { 185 | if (sc.chNext == '\n' || sc.chNext == '\r') { 186 | sc.Forward(); 187 | if (sc.ch == '\r' && sc.chNext == '\n') { 188 | sc.Forward(); 189 | } 190 | continue; 191 | } 192 | } 193 | 194 | // Determine if the current state should terminate. 195 | if (sc.state == OPERATOR || sc.state == NUMBER) { 196 | sc.SetState(DEFAULT); 197 | } else if (sc.state == IDENTIFIER) { 198 | if (!IsAWordChar(sc.ch) || (sc.currentPos+1 == startPos + length)) { 199 | if (IsAWordChar(sc.ch)) { 200 | sc.Forward(); // Checks words at the end of the document. 201 | } 202 | char s[100]; 203 | sc.GetCurrent(s, sizeof(s)); 204 | if (keywords0.InList(s)) { 205 | sc.ChangeState(WORD0); 206 | } else if (keywords1.InList(s)) { 207 | sc.ChangeState(WORD1); 208 | } else if (keywords2.InList(s)) { 209 | sc.ChangeState(WORD2); 210 | } else if (keywords3.InList(s)) { 211 | sc.ChangeState(WORD3); 212 | } else if (keywords4.InList(s)) { 213 | sc.ChangeState(WORD4); 214 | } else if (keywords5.InList(s)) { 215 | sc.ChangeState(WORD5); 216 | } else if (keywords6.InList(s)) { 217 | sc.ChangeState(WORD6); 218 | } else if (keywords7.InList(s)) { 219 | sc.ChangeState(WORD7); 220 | } else if (keywords8.InList(s)) { 221 | sc.ChangeState(WORD8); 222 | } 223 | sc.SetState(DEFAULT); 224 | } 225 | } else if (sc.state == PREPROCESSOR) { 226 | if (sc.ch == '\\') { 227 | if (sc.chNext == '\n' || sc.chNext == '\r' || sc.chNext == '\\') { 228 | sc.Forward(); 229 | } 230 | } else if (sc.ch == '\n' || sc.ch == '\r') { 231 | sc.ForwardSetState(DEFAULT); 232 | } else if (sc.atLineEnd) { 233 | sc.ChangeState(PREPROCEOL); 234 | sc.ForwardSetState(DEFAULT); 235 | } 236 | } else if (sc.state == COMMENTLINE) { 237 | if (sc.atLineEnd) { 238 | sc.ForwardSetState(DEFAULT); 239 | } 240 | } else if (sc.state == STRING) { 241 | if (sc.ch == '\\') { 242 | if (sc.chNext == '\"' || sc.chNext == '\\') { 243 | sc.Forward(); 244 | } 245 | } else if (sc.ch == '\"') { 246 | sc.ForwardSetState(DEFAULT); 247 | } else if (sc.atLineEnd) { 248 | sc.ChangeState(STRINGEOL); 249 | sc.ForwardSetState(DEFAULT); 250 | } 251 | } else if (sc.state == CHARACTER) { 252 | if (sc.ch == '\\') { 253 | if (sc.chNext == '\'' || sc.chNext == '\\') { 254 | sc.Forward(); 255 | } 256 | } else if (sc.ch == '\'') { 257 | sc.ForwardSetState(DEFAULT); 258 | } else if (sc.atLineEnd) { 259 | sc.ChangeState(STRINGEOL); 260 | sc.ForwardSetState(DEFAULT); 261 | } 262 | } else if (sc.state == COMMENTBLOCK || sc.state == COMMENTDOC) { 263 | if (sc.Match('*', '/')) { 264 | sc.Forward(); 265 | sc.ForwardSetState(DEFAULT); 266 | } 267 | } else { 268 | sc.SetState(DEFAULT); 269 | } 270 | 271 | // Determine if a new state should be entered. 272 | if (sc.state == DEFAULT || sc.state == PREPROCESSOR) { 273 | if (sc.state != PREPROCESSOR) { 274 | if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { 275 | sc.SetState(NUMBER); 276 | if (sc.ch == '0' && (sc.chNext == 'x' || sc.chNext == 'X')) { 277 | int j = 1; 278 | while (IsADigit(sc.GetRelative(j+1), 16)) { 279 | j++; 280 | } 281 | sc.Forward(j); 282 | } else { 283 | int j = 0; 284 | bool hitDot(false); 285 | bool hitE(false); 286 | int ch = sc.ch; 287 | int chNext = sc.chNext; 288 | while (IsADigit(ch) || (ch == '.' && !hitDot && !hitE) || 289 | ((ch == 'e' || ch == 'E') && !hitE && (IsADigit(chNext) || 290 | ((chNext == '-' || chNext == '+') && IsADigit(sc.GetRelative(j+2)))))) { 291 | if (ch == '.') { 292 | hitDot = true; 293 | } else if (ch == 'e' || ch == 'E') { 294 | hitE = true; 295 | j++; 296 | if (chNext == '-' || chNext == '+') { 297 | j++; 298 | } 299 | chNext = sc.GetRelative(j+1); 300 | } 301 | j++; 302 | ch = chNext; 303 | chNext = sc.GetRelative(j+1); 304 | } 305 | sc.Forward(j-1); 306 | } 307 | } else if (sc.ch == ':' || sc.ch == '.') { 308 | sc.SetState(OPERATOR); 309 | if (IsAWordChar(sc.chNext) || isspace(sc.chNext)) { 310 | int j = 1; 311 | int ch = sc.chNext; 312 | while((sc.currentPos + j < startPos + length) && isspace(ch)) { 313 | ch = sc.GetRelative(++j); 314 | } 315 | if (IsAWordChar(ch)) { 316 | int i = 0; 317 | char s[101]; 318 | while (i < 100 && IsAWordChar(ch)) { 319 | s[i++] = ch; 320 | ch = sc.GetRelative(++j); 321 | } 322 | s[i++] = '\0'; 323 | if (keywords7.InList(s)) { 324 | sc.Forward(j-i+1); 325 | sc.SetState(WORD7); 326 | } 327 | if (sc.state != OPERATOR) { 328 | sc.Forward(i-2); 329 | } 330 | } 331 | } 332 | } else if (IsAWordChar(sc.ch)) { 333 | sc.SetState(IDENTIFIER); 334 | int j = 0; 335 | int i = 0; 336 | char s[101]; 337 | bool finished = false; 338 | int ch = sc.ch; 339 | 340 | while (i < 100 && (sc.currentPos + j < startPos + length) && !finished && 341 | (IsAWordChar(ch) || isspace(ch) || (ch == '.' || ch == ':'))) { 342 | if (!IsAWordChar(ch)) { 343 | while((sc.currentPos + j < startPos + length) && isspace(ch)) { 344 | ch = sc.GetRelative(++j); 345 | } 346 | if (i < 100 && (ch == '.' || ch == ':')) { 347 | s[i++] = ch; 348 | ch = sc.GetRelative(++j); 349 | while((sc.currentPos + j < startPos + length) && isspace(ch)) { 350 | ch = sc.GetRelative(++j); 351 | } 352 | while(i < 100 && IsAWordChar(ch)) { 353 | s[i++] = ch; 354 | ch = sc.GetRelative(++j); 355 | } 356 | s[i++] = '\0'; 357 | if (sc.state != IDENTIFIER) { 358 | sc.Forward(j-1); 359 | } 360 | } 361 | 362 | finished = true; 363 | } else { 364 | s[i++] = ch; 365 | ch = sc.GetRelative(++j); 366 | } 367 | } 368 | } else if (sc.ch == '\"') { 369 | sc.SetState(STRING); 370 | } else if (sc.ch == '\'') { 371 | sc.SetState(CHARACTER); 372 | } else if (sc.Match('/', '/')) { 373 | sc.SetState(COMMENTLINE); 374 | sc.Forward(); 375 | } else if (sc.Match("/**")) { 376 | sc.SetState(COMMENTDOC); 377 | sc.Forward(); 378 | } else if (sc.Match('/', '*')) { 379 | sc.SetState(COMMENTBLOCK); 380 | sc.Forward(); 381 | } else if (sc.Match('#')) { 382 | sc.SetState(PREPROCESSOR); 383 | sc.Forward(); 384 | } else if (IsCOperator(sc.ch)) { 385 | sc.SetState(OPERATOR); 386 | } 387 | } else if (sc.Match('/', '/')) { 388 | sc.SetState(COMMENTLINE); 389 | sc.Forward(); 390 | } else if (sc.Match("/**")) { 391 | sc.SetState(COMMENTDOC); 392 | sc.Forward(); 393 | } else if (sc.Match('/', '*')) { 394 | sc.SetState(COMMENTBLOCK); 395 | sc.Forward(); 396 | } 397 | } 398 | } 399 | sc.Complete(); 400 | } 401 | 402 | // <--- Fold ---> 403 | void N64C::Fold_Doc(unsigned int startPos, int length, int initStyle, Accessor &styler) 404 | { 405 | unsigned int lengthDoc = startPos + length; 406 | int lineCurrent = styler.GetLine(startPos); 407 | int levelCurrent = SC_FOLDLEVELBASE; 408 | if (lineCurrent > 1) 409 | levelCurrent = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; 410 | else 411 | styler.SetLevel(lineCurrent, SC_FOLDLEVELBASE); 412 | int levelNext = levelCurrent; 413 | char chNext = styler[startPos]; 414 | int styleNext = styler.StyleAt(startPos); 415 | int style = initStyle; 416 | char s[10]; 417 | 418 | for (unsigned int i = startPos; i < lengthDoc; i++) { 419 | char ch = chNext; 420 | chNext = styler.SafeGetCharAt(i + 1); 421 | int stylePrev = style; 422 | style = styleNext; 423 | styleNext = styler.StyleAt(i + 1); 424 | bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); 425 | if (style == PREPROCESSOR) { 426 | char chNext2 = styler.SafeGetCharAt(i + 2); 427 | char chNext3 = styler.SafeGetCharAt(i + 3); 428 | if (ch == '#' && chNext == 'i' && chNext2 == 'f') { 429 | levelNext++; 430 | } else if (ch == '#' && chNext == 'e' && chNext2 == 'n' && chNext3 == 'd') { 431 | levelNext--; 432 | } 433 | } else if (style == OPERATOR) { 434 | if (ch == '{'){ 435 | levelNext++; 436 | } else if (ch == '}'){ 437 | levelNext--; 438 | } 439 | } else if ((style == COMMENTBLOCK || style == COMMENTDOC) && 440 | !(stylePrev == COMMENTBLOCK || stylePrev == COMMENTDOC) && 441 | (ch == '/')) { 442 | levelNext++; 443 | } else if ((style == COMMENTBLOCK || style == COMMENTDOC) && 444 | !(styleNext == COMMENTBLOCK || styleNext == COMMENTDOC) && 445 | (ch == '/')) { 446 | levelNext--; 447 | } else if (style == COMMENTLINE) { 448 | if ((ch == '/' && chNext == '/')) { 449 | char chNext2 = styler.SafeGetCharAt(i + 2); 450 | if (chNext2 == '{') { 451 | levelNext++; 452 | } else if (chNext2 == '}') { 453 | levelNext--; 454 | } 455 | } 456 | } 457 | 458 | if (atEOL || (i == lengthDoc-1)) { 459 | int lev = levelNext; 460 | int levCur = levelCurrent; 461 | if (levelNext > levelCurrent) { 462 | levCur |= SC_FOLDLEVELHEADERFLAG; 463 | } 464 | styler.SetLevel(lineCurrent, levCur); 465 | styler.SetLevel(lineCurrent+1, lev); 466 | lineCurrent++; 467 | levelCurrent = levelNext; 468 | } 469 | } 470 | } 471 | -------------------------------------------------------------------------------- /sourcecode/src/N64C.h: -------------------------------------------------------------------------------- 1 | #ifndef N64C_H 2 | #define N64C_H 3 | 4 | // Notepad++ includes 5 | #include "precompiledHeaders.h" 6 | #include "PluginInterface.h" 7 | 8 | // Scintilla includes 9 | #include "ILexer.h" 10 | #include "PropSetSimple.h" 11 | #include "WordList.h" 12 | #include "LexerBase.h" 13 | 14 | #include "LexAccessor.h" 15 | #include "Accessor.h" 16 | #include "LexerModule.h" 17 | #include "StyleContext.h" 18 | #include "CharacterSet.h" 19 | 20 | #ifdef UNICODE 21 | #define generic_strncpy_s wcsncpy_s 22 | #else 23 | #define generic_strncpy_s strncpy_s 24 | #endif 25 | 26 | namespace N64C 27 | { 28 | static const generic_string PLUGIN_NAME = TEXT("&N64 C Lexer"); 29 | static const std::string LEXER_NAME = "C (N64)"; 30 | static const generic_string LEXER_STATUS_TEXT = TEXT("Nintendo64 C source file"); 31 | 32 | static const int numPluginMenuItems = 1; 33 | FuncItem pluginMenuItems[numPluginMenuItems]; 34 | static const generic_string aboutMenuItem = TEXT("&About"); 35 | void aboutDlg(); 36 | 37 | NppData nppData; 38 | 39 | const int DEFAULT = 0; 40 | 41 | const int PREPROCESSOR = 1; 42 | const int COMMENTBLOCK = 2; 43 | const int COMMENTLINE = 3; 44 | const int COMMENTDOC = 4; 45 | 46 | const int NUMBER = 5; 47 | const int OPERATOR = 6; 48 | const int IDENTIFIER = 9; 49 | 50 | const int STRING = 7; 51 | const int CHARACTER = 8; 52 | const int STRINGEOL = 10; 53 | const int PREPROCEOL = 11; 54 | 55 | const int WORD0 = 20; 56 | const int WORD1 = 21; 57 | const int WORD2 = 22; 58 | const int WORD3 = 23; 59 | const int WORD4 = 24; 60 | const int WORD5 = 25; 61 | const int WORD6 = 26; 62 | const int WORD7 = 27; 63 | const int WORD8 = 28; 64 | 65 | class LexerN64C : public LexerBase { 66 | public: 67 | LexerN64C() {} 68 | 69 | void SCI_METHOD Lex(unsigned int startPos, int length, int initStyle, IDocument *pAccess); 70 | void SCI_METHOD Fold(unsigned int startPos, int length, int initStyle, IDocument *pAccess); 71 | 72 | static ILexer *LexerFactory() { 73 | try { 74 | return new LexerN64C(); 75 | } catch (...) { 76 | // Should not throw into caller as may be compiled with different compiler or options 77 | return 0; 78 | } 79 | } 80 | }; 81 | 82 | void Colourise_Doc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler); 83 | void Fold_Doc(unsigned int startPos, int length, int initStyle, Accessor &styler); 84 | }; 85 | 86 | #endif 87 | -------------------------------------------------------------------------------- /sourcecode/src/N64C.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #include 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | #undef APSTUDIO_READONLY_SYMBOLS 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // English (U.S.) resources 17 | 18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 19 | #ifdef _WIN32 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | #pragma code_page(1252) 22 | #endif //_WIN32 23 | 24 | #ifdef APSTUDIO_INVOKED 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // 27 | // TEXTINCLUDE 28 | // 29 | 30 | 1 TEXTINCLUDE 31 | BEGIN 32 | "resource.h\0" 33 | END 34 | 35 | 2 TEXTINCLUDE 36 | BEGIN 37 | "#include ""afxres.h""\r\n" 38 | "\0" 39 | END 40 | 41 | 3 TEXTINCLUDE 42 | BEGIN 43 | "\r\n" 44 | "\0" 45 | END 46 | 47 | #endif // APSTUDIO_INVOKED 48 | 49 | 50 | ///////////////////////////////////////////////////////////////////////////// 51 | // 52 | // Version 53 | // 54 | 55 | VS_VERSION_INFO VERSIONINFO 56 | FILEVERSION 1,3,0,0 57 | PRODUCTVERSION 1,3,0,0 58 | FILEFLAGSMASK 0x17L 59 | #ifdef _DEBUG 60 | FILEFLAGS 0x1L 61 | #else 62 | FILEFLAGS 0x0L 63 | #endif 64 | FILEOS 0x4L 65 | FILETYPE 0x2L 66 | FILESUBTYPE 0x0L 67 | BEGIN 68 | BLOCK "StringFileInfo" 69 | BEGIN 70 | BLOCK "040904b0" 71 | BEGIN 72 | VALUE "CompanyName", "Buu342" 73 | VALUE "FileDescription", "N64C Dynamic Link Library" 74 | VALUE "FileVersion", "1.3" 75 | VALUE "InternalName", "N64C" 76 | VALUE "LegalCopyright", "Copyright (C) 2018-2019" 77 | VALUE "OriginalFilename", "N64C.dll" 78 | VALUE "ProductName", "N64 C Syntax Plugin for Notepad++" 79 | VALUE "ProductVersion", "1.3" 80 | END 81 | END 82 | BLOCK "VarFileInfo" 83 | BEGIN 84 | VALUE "Translation", 0x409, 1200 85 | END 86 | END 87 | 88 | #endif // English (U.S.) resources 89 | ///////////////////////////////////////////////////////////////////////////// 90 | 91 | 92 | 93 | #ifndef APSTUDIO_INVOKED 94 | ///////////////////////////////////////////////////////////////////////////// 95 | // 96 | // Generated from the TEXTINCLUDE 3 resource. 97 | // 98 | 99 | 100 | ///////////////////////////////////////////////////////////////////////////// 101 | #endif // not APSTUDIO_INVOKED 102 | 103 | -------------------------------------------------------------------------------- /sourcecode/src/N64C_Plugin.def: -------------------------------------------------------------------------------- 1 | LIBRARY "N64C" 2 | 3 | EXPORTS 4 | GetLexerCount = GetLexerCount 5 | GetLexerName = GetLexerName 6 | GetLexerStatusText = GetLexerStatusText 7 | GetLexerFactory = GetLexerFactory 8 | ; Legacy 9 | Lex = NppLex 10 | Fold = NppFold -------------------------------------------------------------------------------- /sourcecode/src/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by N64C.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /sourcecode/vcbuild/N64C.vs.2008.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buu342/NPP-N64SyntaxHighlighter/c3ed3d1fec454fef6e23124b66c897d6013c55d7/sourcecode/vcbuild/N64C.vs.2008.ncb -------------------------------------------------------------------------------- /sourcecode/vcbuild/N64C.vs.2008.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual C++ Express 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GmodLua", "vcbuild.vcproj", "{4570DA81-D482-4BDB-B4AC-3866D0D49B04}" 5 | ProjectSection(ProjectDependencies) = postProject 6 | {4795D021-B6FF-4B9C-9FC5-507B2AF373D4} = {4795D021-B6FF-4B9C-9FC5-507B2AF373D4} 7 | {FCF60E65-1B78-4D1D-AB59-4FC00AC8C248} = {FCF60E65-1B78-4D1D-AB59-4FC00AC8C248} 8 | EndProjectSection 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Notepad++", "..\..\PowerEditor\visual.net\notepadPlus.vcproj", "{FCF60E65-1B78-4D1D-AB59-4FC00AC8C248}" 11 | ProjectSection(ProjectDependencies) = postProject 12 | {4795D021-B6FF-4B9C-9FC5-507B2AF373D4} = {4795D021-B6FF-4B9C-9FC5-507B2AF373D4} 13 | EndProjectSection 14 | EndProject 15 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SciLexer", "..\..\scintilla\vcbuild\SciLexer.vcproj", "{4795D021-B6FF-4B9C-9FC5-507B2AF373D4}" 16 | EndProject 17 | Global 18 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 19 | ANSI Debug|Win32 = ANSI Debug|Win32 20 | ANSI Release|Win32 = ANSI Release|Win32 21 | Unicode Debug|Win32 = Unicode Debug|Win32 22 | Unicode Release|Win32 = Unicode Release|Win32 23 | EndGlobalSection 24 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 25 | {4570DA81-D482-4BDB-B4AC-3866D0D49B04}.ANSI Debug|Win32.ActiveCfg = ANSI Debug|Win32 26 | {4570DA81-D482-4BDB-B4AC-3866D0D49B04}.ANSI Debug|Win32.Build.0 = ANSI Debug|Win32 27 | {4570DA81-D482-4BDB-B4AC-3866D0D49B04}.ANSI Release|Win32.ActiveCfg = ANSI Release|Win32 28 | {4570DA81-D482-4BDB-B4AC-3866D0D49B04}.ANSI Release|Win32.Build.0 = ANSI Release|Win32 29 | {4570DA81-D482-4BDB-B4AC-3866D0D49B04}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32 30 | {4570DA81-D482-4BDB-B4AC-3866D0D49B04}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32 31 | {4570DA81-D482-4BDB-B4AC-3866D0D49B04}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32 32 | {4570DA81-D482-4BDB-B4AC-3866D0D49B04}.Unicode Release|Win32.Build.0 = Unicode Release|Win32 33 | {FCF60E65-1B78-4D1D-AB59-4FC00AC8C248}.ANSI Debug|Win32.ActiveCfg = ANSI Debug|Win32 34 | {FCF60E65-1B78-4D1D-AB59-4FC00AC8C248}.ANSI Debug|Win32.Build.0 = ANSI Debug|Win32 35 | {FCF60E65-1B78-4D1D-AB59-4FC00AC8C248}.ANSI Release|Win32.ActiveCfg = ANSI Release|Win32 36 | {FCF60E65-1B78-4D1D-AB59-4FC00AC8C248}.ANSI Release|Win32.Build.0 = ANSI Release|Win32 37 | {FCF60E65-1B78-4D1D-AB59-4FC00AC8C248}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32 38 | {FCF60E65-1B78-4D1D-AB59-4FC00AC8C248}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32 39 | {FCF60E65-1B78-4D1D-AB59-4FC00AC8C248}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32 40 | {FCF60E65-1B78-4D1D-AB59-4FC00AC8C248}.Unicode Release|Win32.Build.0 = Unicode Release|Win32 41 | {4795D021-B6FF-4B9C-9FC5-507B2AF373D4}.ANSI Debug|Win32.ActiveCfg = Debug|Win32 42 | {4795D021-B6FF-4B9C-9FC5-507B2AF373D4}.ANSI Debug|Win32.Build.0 = Debug|Win32 43 | {4795D021-B6FF-4B9C-9FC5-507B2AF373D4}.ANSI Release|Win32.ActiveCfg = Release|Win32 44 | {4795D021-B6FF-4B9C-9FC5-507B2AF373D4}.ANSI Release|Win32.Build.0 = Release|Win32 45 | {4795D021-B6FF-4B9C-9FC5-507B2AF373D4}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 46 | {4795D021-B6FF-4B9C-9FC5-507B2AF373D4}.Unicode Debug|Win32.Build.0 = Debug|Win32 47 | {4795D021-B6FF-4B9C-9FC5-507B2AF373D4}.Unicode Release|Win32.ActiveCfg = Release|Win32 48 | {4795D021-B6FF-4B9C-9FC5-507B2AF373D4}.Unicode Release|Win32.Build.0 = Release|Win32 49 | EndGlobalSection 50 | GlobalSection(SolutionProperties) = preSolution 51 | HideSolutionNode = FALSE 52 | EndGlobalSection 53 | EndGlobal 54 | -------------------------------------------------------------------------------- /sourcecode/vcbuild/N64C.vs.2008.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buu342/NPP-N64SyntaxHighlighter/c3ed3d1fec454fef6e23124b66c897d6013c55d7/sourcecode/vcbuild/N64C.vs.2008.suo -------------------------------------------------------------------------------- /sourcecode/vcbuild/N64C.vs2008.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buu342/NPP-N64SyntaxHighlighter/c3ed3d1fec454fef6e23124b66c897d6013c55d7/sourcecode/vcbuild/N64C.vs2008.ncb -------------------------------------------------------------------------------- /sourcecode/vcbuild/vcbuild.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 26 | 29 | 32 | 35 | 38 | 41 | 53 | 56 | 59 | 62 | 75 | 78 | 81 | 84 | 87 | 90 | 93 | 96 | 97 | 105 | 108 | 111 | 114 | 117 | 120 | 132 | 135 | 138 | 141 | 155 | 158 | 161 | 164 | 167 | 170 | 173 | 176 | 177 | 185 | 188 | 191 | 194 | 197 | 200 | 212 | 215 | 218 | 221 | 235 | 238 | 241 | 244 | 247 | 250 | 253 | 256 | 257 | 264 | 267 | 270 | 273 | 276 | 279 | 291 | 294 | 297 | 300 | 313 | 316 | 319 | 322 | 325 | 328 | 331 | 334 | 335 | 336 | 337 | 338 | 339 | 344 | 347 | 348 | 351 | 352 | 353 | 358 | 361 | 362 | 365 | 366 | 369 | 370 | 373 | 374 | 375 | 380 | 383 | 384 | 385 | 388 | 391 | 392 | 395 | 396 | 399 | 400 | 403 | 404 | 407 | 408 | 411 | 412 | 415 | 416 | 419 | 420 | 423 | 424 | 427 | 428 | 431 | 432 | 435 | 436 | 439 | 440 | 443 | 444 | 447 | 448 | 451 | 452 | 455 | 456 | 459 | 460 | 463 | 464 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | --------------------------------------------------------------------------------