Browse CVS Repository
Diff of /shiki/shiki/xyzzylisp.stub
Parent Directory
| Revision Log
| Revision Graph
| Patch
| 1 |
"#include \"shiki.h\"" |
"#include \"shiki.h\"" |
| 2 |
|
|
| 3 |
(define-cproc buffer-substring (start::<int> end::<int>) |
(define-cproc buffer-substring (start::<int> end::<int>) |
| 4 |
" ScmObj start, end, result; |
(body <string>? |
| 5 |
GtkTextIter s, e; |
" gchar *substr = Shiki_buffer_substring(start, end); |
| 6 |
gchar *substring; |
if(substr) |
| 7 |
if(Scm_NumCmp(start, end) >= 0) |
SCM_RESULT = SCM_STRING(SCM_MAKE_STR_COPYING(substr)); |
| 8 |
return SCM_FALSE; |
else |
| 9 |
gtk_text_buffer_get_iter_at_offset(Shiki_CURRENT_TEXT_BUFFER, &s, SCM_INT_VALUE(start)); |
SCM_RESULT = SCM_STRING(SCM_FALSE); |
| 10 |
gtk_text_buffer_get_iter_at_offset(Shiki_CURRENT_TEXT_BUFFER, &e, SCM_INT_VALUE(end)); |
g_free(substr);")) |
|
|
|
|
substring = gtk_text_buffer_get_text(Shiki_CURRENT_TEXT_BUFFER, &s, &e, FALSE); |
|
|
result = SCM_MAKE_STR_COPYING(substring); |
|
|
g_free(substring); |
|
|
SCM_RETURN(result);") |
|
|
|
Legend:
| Removed from v.1.2 |
|
| changed lines |
| |
Added in v.1.3 |
|
|
| |