Sponsored Content
Top Forums Programming converting character string to hex string Post 302089722 by Corona688 on Wednesday 20th of September 2006 01:04:29 PM
Old 09-20-2006
CODE TAGS FOR CODE PLEASE.

Anyway.

It is giving the array size for the array because it is an array. It is giving the pointer size for the passed array because it is a pointer -- arrays are passed by reference.
 

10 More Discussions You Might Find Interesting

1. Programming

After converting the hexstr to Hex and storing the Hex in a char*

Hi All, My main intension of is to convert the Hexstring stored in a char* into hex and then prefixing it with "0x" and suffix it with ',' This has to be done for all the hexstring char* is NULL. Store the result prefixed with "0x" and suffixed with ',' in another char* and pass it to... (1 Reply)
Discussion started by: rvan
1 Replies

2. Shell Programming and Scripting

Match hex value in string (Perl)

I am trying to match a character return from a website so that I can replace it. It is the '...' character (didnt even know it existed initially). The character apparently has the hex value of 2026, but in the script, attempting to substitute regular 3 periods is not working. What am I... (2 Replies)
Discussion started by: Guyverix
2 Replies

3. Programming

Hex string conversion?

Hello all. I need help... How can I cenvert this 42ec93df826c804ea531c56594db453d54daad4b to normal text? What convertor I have to use? Thanks. (12 Replies)
Discussion started by: escudo
12 Replies

4. Programming

how to use hex escape char with string in C?

I want it to ouput "abcd", but it dosen't. 1 #include<stdio.h> 2 int main() 3 { 4 printf("a\x62cd"); 5 } 6 gcc alarm.c -o alarm alarm.c: In function 'main': alarm.c:4:9: warning: hex escape sequence out of range It seems that the complier joint "cd" as part of... (8 Replies)
Discussion started by: vistastar
8 Replies

5. Shell Programming and Scripting

Converting parts of a string to "Hex"

Hi Guys, writing a small shell script, i need to convert parts of a string to "Hex". The problem is that it is not the full string that needs to be converted. I think it's best to show an example: $astring = "xxxxxx ABC+10+##########+DEF xxxx" This is only an example to show how the... (9 Replies)
Discussion started by: HansHansen
9 Replies

6. Shell Programming and Scripting

String to HEX conversion in UNIX

i have this below string which i need to convert it to HEX. i have already tried it but it showing extra few things on it.. let me show what i have done and what is the output i am getting and what is the desired output the input string is "!\"\"\"\"\"\"\"!\"\"\"\"\"\"\"" which is... (4 Replies)
Discussion started by: vivek d r
4 Replies

7. Shell Programming and Scripting

Swapping a string of numbers between higher and lower order values(HEX)

I have this below string in a variable cutString=21222222222222222122222222222222 this string is nothing but hex values depicted as below 21:22:22:22:22:22:22:22:21:22:22:22:22:22:22:22 so what i want to achieve is swap the lower order with higher order values in the... (3 Replies)
Discussion started by: vivek d r
3 Replies

8. Shell Programming and Scripting

sed searches a character string for a specified delimiter character, and returns a leading or traili

Hi, Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank. Text file : "1"|"ExternalClassDEA519CF5"|"Art1" "2"|"ExternalClass563EA516C"|"Art3" "3"|"ExternalClass305ED16B8"|"Art9" ... ... ... (2 Replies)
Discussion started by: fspalero
2 Replies

9. Shell Programming and Scripting

Find and increment value in string of hex

I have a long string of hex (from ASN.1 data) where I need to find and change a particular hex value only and increment it. The hex pairs either side (84 and a7) of the value to increment will remain constant. i.e. "84 <length> <value_to_increment> a7" starting with 00. So end result: ... (11 Replies)
Discussion started by: securegooner
11 Replies

10. UNIX for Beginners Questions & Answers

Using sed to split hex string

Hi, I'm looking to split the following hex string into rows of four elements. I've tried the following but it doesn't seem to work. How can I tell sed to match based on a pair of number(s) and letter(s), and add a newline every 4 pairs? In addition, I need to add another newline after every... (5 Replies)
Discussion started by: sand1234
5 Replies
GLVERTEXPOINTER(3G)													       GLVERTEXPOINTER(3G)

NAME
glVertexPointer - define an array of vertex data C SPECIFICATION
void glVertexPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) PARAMETERS
size Specifies the number of coordinates per vertex; must be 2, 3, or 4. The initial value is 4. type Specifies the data type of each coordinate in the array. Symbolic constants GL_SHORT, GL_INT, GL_FLOAT, and GL_DOUBLE are accepted. The initial value is GL_FLOAT. stride Specifies the byte offset between consecutive vertices. If stride is 0, the vertices are understood to be tightly packed in the array. The initial value is 0. pointer Specifies a pointer to the first coordinate of the first vertex in the array. The initial value is 0. DESCRIPTION
glVertexPointer specifies the location and data of an array of vertex coordinates to use when rendering. size specifies the number of coordinates per vertex and type the data type of the coordinates. stride specifies the byte stride from one vertex to the next allowing vertices and attributes to be packed into a single array or stored in separate arrays. (Single-array storage may be more efficient on some implementations; see glInterleavedArrays.) When a vertex array is specified, size, type, stride, and pointer are saved as client-side state. To enable and disable the vertex array, call glEnableClientState and glDisableClientState with the argument GL_VERTEX_ARRAY. If enabled, the vertex array is used when glDrawArrays, glDrawElements, or glArrayElement is called. Use glDrawArrays to construct a sequence of primitives (all of the same type) from prespecified vertex and vertex attribute arrays. Use glArrayElement to specify primitives by indexing vertices and vertex attributes and glDrawElements to construct a sequence of primitives by indexing vertices and vertex attributes. NOTES
glVertexPointer is available only if the GL version is 1.1 or greater. The vertex array is initially disabled and isn't accessed when glArrayElement, glDrawElements or glDrawArrays is called. Execution of glVertexPointer is not allowed between the execution of glBegin and the corresponding execution of glEnd, but an error may or may not be generated. If no error is generated, the operation is undefined. glVertexPointer is typically implemented on the client side. Vertex array parameters are client-side state and are therefore not saved or restored by glPushAttrib and glPopAttrib. Use glPushClientAttrib and glPopClientAttrib instead. ERRORS
GL_INVALID_VALUE is generated if size is not 2, 3, or 4. GL_INVALID_ENUM is generated if type is is not an accepted value. GL_INVALID_VALUE is generated if stride is negative. ASSOCIATED GETS
glIsEnabled with argument GL_VERTEX_ARRAY glGet with argument GL_VERTEX_ARRAY_SIZE glGet with argument GL_VERTEX_ARRAY_TYPE glGet with argument GL_VERTEX_ARRAY_STRIDE glGetPointerv with argument GL_VERTEX_ARRAY_POINTER SEE ALSO
glArrayElement, glColorPointer, glDrawArrays, glDrawElements, glDrawRangeElements, glEdgeFlagPointer, glEnable, glGetPointerv, glIndexPointer, glInterleavedArrays, glNormalPointer, glPopClientAttrib, glPushClientAttrib, glTexCoordPointer GLVERTEXPOINTER(3G)
All times are GMT -4. The time now is 10:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy