pcman-bbs / pcmanx

GTK version
GNU General Public License v2.0
79 stars 74 forks source link

Numbering post push #75

Closed hwangcc23 closed 6 years ago

hwangcc23 commented 8 years ago

Numbering Post-Push

Numbering Post-Push is a good function for discussion in one post. See the issue #42(https://github.com/pcman-bbs/pcmanx/issues/42).

1). Add a field PostPushNum in the line structure. The line structure: struct{ char[ColsPerPage], char='\0', CTermCharAttr[ColsPerPage, char=0]} [ ColsPerPage_char + '\0' + ColsPerPage_CTermCharAttr + PostPushNum ]

2). Detect Post-Push lines and numbering them whenever a character is added in the screen buffer of CTermData.

3). Save the number in PostPushNum of Post-Push lines.

4). Draw PostPushNum in CTermView:DrawChar().

5). Fix a bug of buffer overflow in CTermData::InsertChar(). p.s. Though the function is not used now.