• R/O
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

BASIC compiler/interpreter for PIC32MX/MZ-80K (suspended)


Commit MetaInfo

Revision139 (tree)
Time2016-07-24 11:54:15
Authorkmorimatsu

Log Message

Kenken's change on 7/23/2016

Change Summary

Incremental Difference

--- mips/branches/nauplia/editor.c (revision 138)
+++ mips/branches/nauplia/editor.c (revision 139)
@@ -102,23 +102,30 @@
102102 // テキスト全体の先頭からline行目のテキストバッファ上の位置を返す
103103 // 戻り値 テキストバッファポインタ
104104 // *pix(戻り値):戻り値テキストバッファの先頭からの位置(ポインタ渡し)
105- _tbuf *bp;
106- int ix;
105+ _tbuf *bp,*bp2;
106+ int ix,ix2;
107107 bp=TBufstart;
108+ bp2=TBufstart;
108109 ix=0;
110+ ix2=0;
109111 while(line>1){
110112 while(1){
111113 if(ix>=bp->n){
114+ if(bp->next==NULL) break;
112115 bp=bp->next;
113116 ix=0;
114117 continue;
115118 }
116- if(bp->Buf[ix++] == '\n') break;
119+ if(bp->Buf[ix++] == '\n'){
120+ bp2=bp;
121+ ix2=ix;
122+ break;
123+ }
117124 }
118125 line--;
119126 }
120- *pix=ix;
121- return bp;
127+ *pix=ix2;
128+ return bp2;
122129 }
123130
124131 _tbuf * newTBuf(_tbuf *prev){
--- mips/branches/zoea/editor.c (revision 138)
+++ mips/branches/zoea/editor.c (revision 139)
@@ -102,23 +102,30 @@
102102 // テキスト全体の先頭からline行目のテキストバッファ上の位置を返す
103103 // 戻り値 テキストバッファポインタ
104104 // *pix(戻り値):戻り値テキストバッファの先頭からの位置(ポインタ渡し)
105- _tbuf *bp;
106- int ix;
105+ _tbuf *bp,*bp2;
106+ int ix,ix2;
107107 bp=TBufstart;
108+ bp2=TBufstart;
108109 ix=0;
110+ ix2=0;
109111 while(line>1){
110112 while(1){
111113 if(ix>=bp->n){
114+ if(bp->next==NULL) break;
112115 bp=bp->next;
113116 ix=0;
114117 continue;
115118 }
116- if(bp->Buf[ix++] == '\n') break;
119+ if(bp->Buf[ix++] == '\n'){
120+ bp2=bp;
121+ ix2=ix;
122+ break;
123+ }
117124 }
118125 line--;
119126 }
120- *pix=ix;
121- return bp;
127+ *pix=ix2;
128+ return bp2;
122129 }
123130
124131 _tbuf * newTBuf(_tbuf *prev){