Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mtext_data(3m17n) [debian man page]

mtext_data(3m17n)						 The m17n Library						 mtext_data(3m17n)

NAME
mtext_data - Get information about the text data in M-text. SYNOPSIS
void* mtext_data (MText * mt, enum MTextFormat * fmt, int * nunits, int * pos_idx, int * unit_idx) DESCRIPTION
Get information about the text data in M-text. The mtext_data() function returns a pointer to the text data of M-text mt. If fmt is not NULL, the format of the text data is stored in it. If nunits is not NULL, the number of units of the text data is stored in it. If pos_idx is not NULL and it points to a non-negative number, what it points to is a character position. In this case, the return value is a pointer to the text data of a character at that position. Otherwise, if unit_idx is not NULL, it points to a unit position. In this case, the return value is a pointer to the text data of a character containing that unit. The character position and unit position of the return value are stored in pos_idx and unit_dix respectively if they are not NULL. o If the format of the text data is MTEXT_FORMAT_US_ASCII or MTEXT_FORMAT_UTF_8, one unit is unsigned char. o If the format is MTEXT_FORMAT_UTF_16LE or MTEXT_FORMAT_UTF_16BE, one unit is unsigned short. o If the format is MTEXT_FORMAT_UTF_32LE or MTEXT_FORMAT_UTF_32BE, one unit is unsigned int. COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA) Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>. Version 1.6.2 12 Jan 2011 mtext_data(3m17n)

Check Out this Related Man Page

mtext_from_data(3m17n)						 The m17n Library					    mtext_from_data(3m17n)

NAME
mtext_from_data - Allocate a new M-text with specified data. SYNOPSIS
MText* mtext_from_data (const void * data, int nitems, enum MTextFormat format) DESCRIPTION
Allocate a new M-text with specified data. The mtext_from_data() function allocates a new M-text whose character sequence is specified by array data of nitems elements. format specifies the format of data. When format is either MTEXT_FORMAT_US_ASCII or MTEXT_FORMAT_UTF_8, the contents of data must be of the type unsigned char, and nitems counts by byte. When format is either MTEXT_FORMAT_UTF_16LE or MTEXT_FORMAT_UTF_16BE, the contents of data must be of the type unsigned short, and nitems counts by unsigned short. When format is either MTEXT_FORMAT_UTF_32LE or MTEXT_FORMAT_UTF_32BE, the contents of data must be of the type unsigned, and nitems counts by unsigned. The character sequence of the M-text is not modifiable. The contents of data must not be modified while the M-text is alive. The allocated M-text will not be freed unless the user explicitly does so with the m17n_object_unref() function. Even in that case, data is not freed. RETURN VALUE
If the operation was successful, mtext_from_data() returns a pointer to the allocated M-text. Otherwise it returns NULL and assigns an error code to the external variable merror_code. ERRORS
MERROR_MTEXT COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA) Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>. Version 1.6.2 12 Jan 2011 mtext_from_data(3m17n)
Man Page

5 More Discussions You Might Find Interesting

1. Programming

coverting html data to text in 'c'

hi, iam reading the webpage using curl socket. so iam geting the data in html format so how can convert html data to text data ,so i can move forward. thank u, sree (3 Replies)
Discussion started by: phani_sree
3 Replies

2. UNIX for Dummies Questions & Answers

copy loses the text format

Hi I try to copy part of text from one file to another file. My problem is the text in the new file loses all the format. My code is: #!/bin/sh while red line do if then echo "$line" >> ./new_file else break fi done < "./old_file" Is there a way to modify... (3 Replies)
Discussion started by: tiger99
3 Replies

3. Programming

Reading frm text file

hi, Actually i have a text file which contain data in the following format: ---------------------------------- black pepper john barber steven johnson ------------------------------------ and the list goes on. I'm writing a c program that reads the text file and output the following... (10 Replies)
Discussion started by: kanexxx
10 Replies

4. UNIX for Dummies Questions & Answers

Unexplained text in data files

Has anyone ever encountered text from other files suddenly appearing in another data file that is not being used. There does not seem to be any reason for it, any thoughts would be useful. Thanks (14 Replies)
Discussion started by: SRoberts
14 Replies

5. Shell Programming and Scripting

Sum value in text file

I need to sum values in text file in case duplicate row are present with same name and different value below is example of data in file i have and format i need. Data in text file 20170308 PM,U,2 PM,U,1 PM,U, 113 PM,I,123 PM,U,123 DA,U 135 DA,I,113 DA,I,1 DA,U,22 20170309 PM,U,2... (6 Replies)
Discussion started by: Adfire
6 Replies