By default, the csdn template has loaded the files required by syntaxhighlighter.
Syntaxhighlighter uses <PRE> and <textarea> as the container for displaying Code. However, currently, csdn only supports <textarea>. in addition, the online editing function of csdn often proactively adds <br/> to the <PRE> content, thus damaging the original content. Therefore, <PRE> is not recommended in csdn. Otherwise, it will take a lot of time to complete the changes.
When syntaxhighlighter is used in csdn, the name and class attributes of <textarea> must be specified. The name must be "code", and the class is set as needed. The above example is C ++ code, and its class is set to "CPP". If it is C # code, the class should be set to "C-sharp ". The Rows and Cols attributes can be set. Syntaxhighlighter automatically sets its value based on the page. However, during the editing process, you can set initial values for these two attributes to facilitate code input. In my experience, if you are writing a blog online on csdn, you can set rows to 10 and Cols to 95 to get a better editing environment.
# Include <stdio. h> </P> <p> int main () <br/>{< br/> printf ("Thanks syntaxhighlighter !! /N); <br/> return 0; <br/>}
Since compilation is not supported, it is also good to use the old Luo code coloring tool. The effect is as follows:
; **************************************** ****************************
; API function pathfindextensiona by G-spider [Moon cave]
Pathfindextension function: return the header pointer of the suffix string ". ASM" in the path "D:/masm32/examples/exampl05/LCD. LCD. ASM"
Input parameter: path pointer lppathbuffer, which can be obtained by lpstrfile
; Return Value: eax
; **************************************** ****************************
Pathfindextension proc uses ESI lppathbuffer: DWORD
;----------------------------------------------------------------------
MoV eax, lppathbuffer
Xor esi, ESI
Test eax, eax
Je short l77f5f625
MoV Cl, byte ptr ds: [eax]
Test Cl, Cl
Je short l77f5f625
L77f5f603:
CMP Cl, 20 h; 20 h = 32D, which is an ascii code space, that is, check whether it is a space character
Je short l77f5f62a; jump to Space
CMP Cl, 2EH; 2EH = 46d, which is the ASCII code '.', that is, check whether the node number is
Je short l77f5f5e5; jump
CMP Cl, 5ch; 5ch = 92d, which is the ASCII code '/', that is, check whether it is a delimiter slash
Je short l77f5f62a; jump if it is a slash
L77f5f612:
Push eax
Call charnexta
MoV Cl, byte ptr ds: [eax]
Test Cl, Cl
Jnz short l77f5f603
Test ESI, ESI
Je short l77f5f625
MoV eax, ESI
L77f5f625:
RET
L77f5f62a:
Xor esi, ESI; indicates that the dot '.' is not followed by a suffix. Therefore, the pointer is cleared to 0, and the pointer value of this vertex is no longer saved.
JMP short l77f5f612
L77f5f5e5:
MoV ESI, eax; if it is a '.' dot, use ESI to save its pointer Value
JMP short l77f5f612; then judge the next character
;----------------------------------------------------------------------
Pathfindextension endp
; **************************************** ****************************