Develop and Download Open Source Software

Browse CVS Repository

Diff of /shiki/shiki/xyzzylisp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2 by aloha, Fri Nov 24 19:31:04 2006 UTC revision 1.3 by aloha, Sat Nov 25 09:10:43 2006 UTC
# Line 20  static ScmObj xyzzylisp_buffer_substring Line 20  static ScmObj xyzzylisp_buffer_substring
20    if (!SCM_EXACTP(end_scm)) Scm_Error("C integer required, but got %S", end_scm);    if (!SCM_EXACTP(end_scm)) Scm_Error("C integer required, but got %S", end_scm);
21    end = Scm_GetInteger(end_scm);    end = Scm_GetInteger(end_scm);
22    {    {
23    ScmObj start, end, result;  {
24    GtkTextIter s, e;  ScmString* SCM_RESULT;
25    gchar *substring;    gchar *substr = Shiki_buffer_substring(start, end);
26    if(Scm_NumCmp(start, end) >= 0)    if(substr)
27      return SCM_FALSE;      SCM_RESULT = SCM_STRING(SCM_MAKE_STR_COPYING(substr));
28    gtk_text_buffer_get_iter_at_offset(Shiki_CURRENT_TEXT_BUFFER, &s, SCM_INT_VALUE(start));    else
29    gtk_text_buffer_get_iter_at_offset(Shiki_CURRENT_TEXT_BUFFER, &e, SCM_INT_VALUE(end));      SCM_RESULT = SCM_STRING(SCM_FALSE);
30      g_free(substr);
31    substring = gtk_text_buffer_get_text(Shiki_CURRENT_TEXT_BUFFER, &s, &e, FALSE);  SCM_RETURN(SCM_MAKE_MAYBE(SCM_OBJ_SAFE, SCM_RESULT));
32    result = SCM_MAKE_STR_COPYING(substring);  }
   g_free(substring);  
   SCM_RETURN(result);  
33    }    }
34  }  }
35    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26