This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void Basic_buffer::add_line( const char * const buf, const int len ) | |
| { | |
| data.back().append( buf, len ); | |
| if( data.back().size() && data.back()[data.back().size()-1] == '\n' ) | |
| { | |
| if( data.size() >= data.capacity() && data.size() >= 10000 ) | |
| data.reserve( data.size() + ( data.size() / 10 ) ); | |
| data.push_back( std::string() ); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void | |
| bufinsert(Buffer *b, uint q0, Rune *s, uint n) | |
| { | |
| uint i, m, t, off; | |
| if(q0 > b->nc) | |
| panic("internal error: bufinsert"); | |
| while(n > 0){ | |
| setcache(b, q0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Append after line a lines returned by function f. | |
| * Be careful about intermediate states to avoid scramble | |
| * if an interrupt comes in. | |
| */ | |
| int | |
| append(int (*f)(void), line *a) | |
| { | |
| register line *a1, *a2, *rdot; | |
| int nline; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void | |
| _gtk_text_btree_insert (GtkTextIter *iter, | |
| const gchar *text, | |
| gint len) | |
| { | |
| GtkTextLineSegment *prev_seg; /* The segment just before the first | |
| * new segment (NULL means new segment | |
| * is at beginning of line). */ | |
| GtkTextLineSegment *cur_seg; /* Current segment; new characters | |
| * are inserted just after this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void | |
| insert_1_both (const char *string, | |
| ptrdiff_t nchars, ptrdiff_t nbytes, | |
| bool inherit, bool prepare, bool before_markers) | |
| { | |
| if (nchars == 0) | |
| return; | |
| if (NILP (BVAR (current_buffer, enable_multibyte_characters))) | |
| nchars = nbytes; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void CellBuffer::BasicInsertString(int position, const char *s, int insertLength) { | |
| if (insertLength == 0) | |
| return; | |
| PLATFORM_ASSERT(insertLength > 0); | |
| substance.InsertFromArray(position, s, 0, insertLength); | |
| style.InsertValue(position, insertLength, 0); | |
| int lineInsert = lv.LineFromPosition(position) + 1; | |
| bool atLineStart = lv.LineStart(lineInsert-1) == position; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function toDateTime(date, time) { | |
| gsub(/\//, " ", $2) | |
| awkDate = $2 | |
| gsub(/:/, " ", $3) | |
| awkTime = $3 | |
| return mktime(awkDate " " awkTime) | |
| } | |
| /^i / { | |
| clockIn = toDateTime($2, $3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| A widget that will appear when the screen reaches a certain size. Allows opening and closing of a sidebar. | |
| 100% pure, vanilla JavaScript and CSS. | |
| */ | |
| (function(){ | |
| var Badge = function(target, placement) { | |
| var self = this; | |
| this.target = target; | |
| this.placement = placement; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MusicSelectData: | |
| .db WaterMusic, GroundMusic, UndergroundMusic, CastleMusic | |
| .db CloudMusic, PipeIntroMusic | |
| GetAreaMusic: | |
| lda OperMode ;if in title screen mode, leave | |
| beq ExitGetM | |
| lda AltEntranceControl ;check for specific alternate mode of entry | |
| cmp #$02 ;if found, branch without checking starting position | |
| beq ChkAreaType ;from area object data header |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {- | |
| A brainfuck interpreter in Haskell. | |
| An exercise to flex these FP muscles. | |
| -} | |
| module Main where | |
| import Debug.Trace | |
| import Control.Monad.Trans.State.Lazy |