Macros | Functions | Variables
farsi.c File Reference
#include <assert.h>
#include <stdbool.h>
#include "nvim/cursor.h"
#include "nvim/edit.h"
#include "nvim/ex_docmd.h"
#include "nvim/ex_eval.h"
#include "nvim/ex_getln.h"
#include "nvim/farsi.h"
#include "nvim/getchar.h"
#include "nvim/memline.h"
#include "nvim/message.h"
#include "nvim/misc1.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/vim.h"
#include "nvim/ascii.h"

Macros

#define SRC_EDT   0
 
#define SRC_CMD   1
 
#define AT_CURSOR   0
 

Functions

int fkmap (int c)
 Map Farsi keyboard when in fkmap mode. More...
 
char_ulrswap (char_u *ibuf)
 
char_ulrFswap (char_u *cmdbuf, int len)
 
char_ulrF_sub (char_u *ibuf)
 
int cmdl_fkmap (int c)
 
bool F_isalpha (int c)
 
bool F_isdigit (int c)
 
bool F_ischar (int c)
 
void farsi_f8 (cmdarg_T *cap FUNC_ATTR_UNUSED)
 
void farsi_f9 (cmdarg_T *cap FUNC_ATTR_UNUSED)
 

Variables

const char_u farsi_text_1 []
 
const char_u farsi_text_2 []
 
const char_u farsi_text_3 []
 
const char_u farsi_text_5 []
 

Detailed Description

Functions for Farsi language

Macro Definition Documentation

#define AT_CURSOR   0
#define SRC_CMD   1
#define SRC_EDT   0

Function Documentation

int cmdl_fkmap ( int  c)

Map Farsi keyboard when in cmd_fkmap mode.

Parameters
c
Returns
The mapped character.
bool F_isalpha ( int  c)

F_isalpha returns true if 'c' is in the Farsi alphabet.

Parameters
cThe character to check.
Returns
true if 'c' is a Farsi alphabet character.
bool F_ischar ( int  c)

F_ischar returns true if 'c' is a Farsi character.

Parameters
cThe character to check.
Returns
true if 'c' is a Farsi character.
bool F_isdigit ( int  c)

F_isdigit returns true if 'c' is a Farsi digit

Parameters
cThe character to check.
Returns
true if 'c' is a Farsi digit.
void farsi_f8 ( cmdarg_T *cap  FUNC_ATTR_UNUSED)
void farsi_f9 ( cmdarg_T *cap  FUNC_ATTR_UNUSED)
int fkmap ( int  c)

Map Farsi keyboard when in fkmap mode.

char_u* lrF_sub ( char_u ibuf)

Reverse the characters in the search path and substitute section accordingly. TODO: handle different separator characters. Use skip_regexp().

Parameters
ibuf
Returns
The buffer with the characters in the search path and substitute section reversed.
char_u* lrFswap ( char_u cmdbuf,
int  len 
)

swap all the Farsi characters in reverse direction

Parameters
cmdbuf
.
Returns
The buffer with all Farsi characters swapped.
char_u* lrswap ( char_u ibuf)

swap all the characters in reverse direction

Parameters
ibuf
Returns
The buffer with the characters swapped.

Variable Documentation

const char_u farsi_text_1[]
Initial value:
= {
YE_, _SIN, RE, ALEF_, _FE, ' ', 'V', 'I', 'M', ' ', F_HE, _BE, ' ', SHIN, RE,
_GAF, DAL, ' ', NOON, ALEF_, _YE, ALEF_, _PE, '\0'
}
#define _YE
Definition: farsi.h:52
#define _PE
Definition: farsi.h:25
#define NOON
Definition: farsi.h:129
#define DAL
Definition: farsi.h:110
#define YE_
Definition: farsi.h:58
#define F_HE
Definition: farsi.h:131
#define _FE
Definition: farsi.h:42
#define _SIN
Definition: farsi.h:32
#define RE
Definition: farsi.h:112
#define _GAF
Definition: farsi.h:45
#define ALEF_
Definition: farsi.h:23
#define _BE
Definition: farsi.h:24
#define SHIN
Definition: farsi.h:116
const char_u farsi_text_2[]
Initial value:
= {
RE, ALEF, DAL, _NOON, ALEF_, _TE, _SIN, ALEF, ' ', F_HE, _BE, ' ', SHIN, RE,
_GAF, DAL, ' ', NOON, ALEF_, _YE, ALEF_, _PE, '\0'
}
#define _YE
Definition: farsi.h:52
#define _PE
Definition: farsi.h:25
#define NOON
Definition: farsi.h:129
#define FARSI_3
Definition: farsi.h:84
#define FARSI_2
Definition: farsi.h:83
#define DAL
Definition: farsi.h:110
#define _NOON
Definition: farsi.h:49
#define YE_
Definition: farsi.h:58
#define F_HE
Definition: farsi.h:131
#define FARSI_4
Definition: farsi.h:85
#define _TE
Definition: farsi.h:26
#define _FE
Definition: farsi.h:42
#define _SIN
Definition: farsi.h:32
#define ALEF
Definition: farsi.h:100
#define RE
Definition: farsi.h:112
#define _GAF
Definition: farsi.h:45
#define ALEF_
Definition: farsi.h:23
#define _BE
Definition: farsi.h:24
#define SHIN
Definition: farsi.h:116
const char_u farsi_text_3[]
Initial value:
= {
_SHIN, _PE, ' ', 'R', 'E', 'P', 'L', 'A', 'C', 'E', ' ', NOON, ALEF_, _MIM,
RE, _FE, ZE, ALEF, ' ', 'R', 'E', 'V', 'E', 'R', 'S', 'E', ' ', 'I', 'N', 'S',
'E', 'R', 'T', ' ', SHIN, WAW, RE, ' ', ALEF_, _BE, ' ', YE_, _SIN, RE, ALEF_,
_FE, ' ', RE, DAL, ' ', RE, ALEF_, _KAF, ' ', MIM, ALEF_, _GAF, _NOON, _HE,
'\0'
}
#define _YE
Definition: farsi.h:52
#define _PE
Definition: farsi.h:25
#define NOON
Definition: farsi.h:129
#define DAL
Definition: farsi.h:110
#define _SHIN
Definition: farsi.h:33
#define _NOON
Definition: farsi.h:49
#define YE_
Definition: farsi.h:58
#define MIM
Definition: farsi.h:128
#define WAW
Definition: farsi.h:130
#define _TE
Definition: farsi.h:26
#define _FE
Definition: farsi.h:42
#define _HE
Definition: farsi.h:50
#define ZE
Definition: farsi.h:113
#define _SIN
Definition: farsi.h:32
#define ALEF
Definition: farsi.h:100
#define _MIM
Definition: farsi.h:48
#define RE
Definition: farsi.h:112
#define _GAF
Definition: farsi.h:45
#define ALEF_
Definition: farsi.h:23
#define _BE
Definition: farsi.h:24
#define SHIN
Definition: farsi.h:116
#define _KAF
Definition: farsi.h:44
const char_u farsi_text_5[]
Initial value:
= {
' ', YE_, _SIN, RE, ALEF_, _FE, '\0'
}
#define YE_
Definition: farsi.h:58
#define _FE
Definition: farsi.h:42
#define _SIN
Definition: farsi.h:32
#define RE
Definition: farsi.h:112
#define ALEF_
Definition: farsi.h:23