Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/text.c')
-rw-r--r--source/blender/blenkernel/intern/text.c40
1 files changed, 3 insertions, 37 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 9a7e54600a5..4406647bd2c 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -279,9 +279,6 @@ IDTypeInfo IDType_ID_TXT = {
/** \name Text Add, Free, Validation
* \{ */
-/**
- * \note caller must handle `compiled` member.
- */
void BKE_text_free_lines(Text *text)
{
for (TextLine *tmp = text->lines.first, *tmp_next; tmp; tmp = tmp_next) {
@@ -311,8 +308,6 @@ Text *BKE_text_add(Main *bmain, const char *name)
return ta;
}
-/* this function replaces extended ascii characters */
-/* to a valid utf-8 sequences */
int txt_extended_ascii_as_utf8(char **str)
{
ptrdiff_t bad_char, i = 0;
@@ -475,14 +470,6 @@ bool BKE_text_reload(Text *text)
return true;
}
-/**
- * Load a text file.
- *
- * \param is_internal: If \a true, this text data-block only exists in memory,
- * not as a file on disk.
- *
- * \note text data-blocks have no real user but have 'fake user' enabled by default
- */
Text *BKE_text_load_ex(Main *bmain, const char *file, const char *relpath, const bool is_internal)
{
unsigned char *buffer;
@@ -535,11 +522,6 @@ Text *BKE_text_load_ex(Main *bmain, const char *file, const char *relpath, const
return ta;
}
-/**
- * Load a text file.
- *
- * \note Text data-blocks have no user by default, only the 'real user' flag.
- */
Text *BKE_text_load(Main *bmain, const char *file, const char *relpath)
{
return BKE_text_load_ex(bmain, file, relpath, false);
@@ -559,11 +541,6 @@ void BKE_text_write(Text *text, const char *str) /* called directly from rna */
txt_make_dirty(text);
}
-/* returns 0 if file on disk is the same or Text is in memory only
- * returns 1 if file has been modified on disk since last local edit
- * returns 2 if file on disk has been deleted
- * -1 is returned if an error occurs */
-
int BKE_text_file_modified_check(Text *text)
{
BLI_stat_t st;
@@ -1143,7 +1120,6 @@ void txt_move_toline(Text *text, unsigned int line, const bool sel)
txt_move_to(text, line, 0, sel);
}
-/* Moves to a certain byte in a line, not a certain utf8-character! */
void txt_move_to(Text *text, unsigned int line, unsigned int ch, const bool sel)
{
TextLine **linep;
@@ -1303,11 +1279,6 @@ void txt_sel_all(Text *text)
text->selc = text->sell->len;
}
-/**
- * Reverse of #txt_pop_sel
- * Clears the selection and ensures the cursor is located
- * at the selection (where the cursor is visually while editing).
- */
void txt_sel_clear(Text *text)
{
if (text->sell) {
@@ -1394,9 +1365,6 @@ void txt_sel_set(Text *text, int startl, int startc, int endl, int endc)
* - Are not null terminated.
* \{ */
-/**
- * Create a buffer, the only requirement is #txt_from_buf_for_undo can decode it.
- */
char *txt_to_buf_for_undo(Text *text, int *r_buf_len)
{
int buf_len = 0;
@@ -1414,9 +1382,6 @@ char *txt_to_buf_for_undo(Text *text, int *r_buf_len)
return buf;
}
-/**
- * Decode a buffer from #txt_to_buf_for_undo.
- */
void txt_from_buf_for_undo(Text *text, const char *buf, int buf_len)
{
const char *buf_end = buf + buf_len;
@@ -2413,10 +2378,11 @@ int text_check_bracket(const char ch)
return 0;
}
-/* TODO: have a function for operators -
- * http://docs.python.org/py3k/reference/lexical_analysis.html#operators */
bool text_check_delim(const char ch)
{
+ /* TODO: have a function for operators:
+ * http://docs.python.org/py3k/reference/lexical_analysis.html#operators */
+
int a;
char delims[] = "():\"\' ~!%^&*-+=[]{};/<>|.#\t,@";