I'd just like to add that a good way to use realloc is to assign to a temp variable rather then the variable you are copying from. That way if realloc fails you haven't lost the memory in your original variable. i.e.
Work problem:
Need to set up a job to periodically check that the number of entries in the mail queue.
I'm able to do the following: mailq | grep "Mail Queue"
Which returns: Mail Queue (7 requests)
Unfortunately I'm not sure how I select between `(` and `requests`?
... (2 Replies)
Hi guys, I hope you can help me with my problem.
I have a text file that contains lines like this:
78 ANGELO -809.05
79 ANGELO2 -5,000.06
I need to find all occurences of amounts that are negative and replace them with x's
78 ANGELO xxxxxxx
79... (4 Replies)
Hello All,
Plz help me with:
I have a csv file with data separated by ',' and optionally enclosed by "". I want to check each of these values to see if they exceed the specified string length, and if they do I want to cut just that value to the max length allowed and keep the csv format as it... (9 Replies)
hi,
im quite new to perl regexp. i have a problem where i want to extract a word from a given string. but the word is unknown, only fact is that it appears as the second word in the string.
Eg.
input string(s) :
char var1 = 'A';
int var2 = 10;
char *ptr;
and what i want to do is... (3 Replies)
Dear friends, Please help me to resolve the problem below,
I have a file with following content:
date of file creation : 12 feb 2007
====================
= name : suresh
= city :mumbai
#this is a blank line
= date : 1st Nov 2005
====================
few lines of some text
this... (7 Replies)
HI
In my script, i am reading the input from the user and want to find the length of the string.
The input may contain leading spaces. Right now, when leading spaces are there, they are not counted.
Kindly help me
My script is like below. I am using the ksh.
#!/usr/bin/ksh
echo... (2 Replies)
I have a string:
hgLogOutput=" +0000 files: forum/web/hook-test.txt /forum/web/hook-test-2.txt description: test"
and I want to extract the file names from it, they will always appear between the files: and the description:. I have worked out that I can do this:
"$hgLogOutput" | awk '{... (2 Replies)
I’m looking for an elegant way to convert a delimited file (comma delimited in this case) to padded columns (for printing in non-proportional font) but the length of each column is not known ahead of time. It needs to be calculated for each column from the longest entry in that column in a given... (3 Replies)
Hi
I have a file which contains wrong XML, There are some garbage characters at the end of line that I want to get rid of. Example:
<request type="product" ><attributes><pair><name>q</name><value><!]></value></pair><pair><name>start</name><value>1</value></pair></attributes></request>�J ... (7 Replies)
Discussion started by: dirtyd0ggy
7 Replies
LEARN ABOUT CENTOS
glshadersource
GLSHADERSOURCE(3G) OpenGL Manual GLSHADERSOURCE(3G)NAME
glShaderSource - Replaces the source code in a shader object
C SPECIFICATION
void glShaderSource(GLuint shader, GLsizei count, const GLchar **string, const GLint *length);
PARAMETERS
shader
Specifies the handle of the shader object whose source code is to be replaced.
count
Specifies the number of elements in the string and length arrays.
string
Specifies an array of pointers to strings containing the source code to be loaded into the shader.
length
Specifies an array of string lengths.
DESCRIPTION
glShaderSource sets the source code in shader to the source code in the array of strings specified by string. Any source code previously
stored in the shader object is completely replaced. The number of strings in the array is specified by count. If length is NULL, each
string is assumed to be null terminated. If length is a value other than NULL, it points to an array containing a string length for each of
the corresponding elements of string. Each element in the length array may contain the length of the corresponding string (the null
character is not counted as part of the string length) or a value less than 0 to indicate that the string is null terminated. The source
code strings are not scanned or parsed at this time; they are simply copied into the specified shader object.
NOTES
OpenGL copies the shader source code strings when glShaderSource is called, so an application may free its copy of the source code strings
immediately after the function returns.
ERRORS
GL_INVALID_VALUE is generated if shader is not a value generated by OpenGL.
GL_INVALID_OPERATION is generated if shader is not a shader object.
GL_INVALID_VALUE is generated if count is less than 0.
ASSOCIATED GETS
glGetShader() with arguments shader and GL_SHADER_SOURCE_LENGTH
glGetShaderSource() with argument shader
glIsShader()
SEE ALSO
glCompileShader(), glCreateShader(), glDeleteShader()
COPYRIGHT
Copyright (C) 2003-2005 3Dlabs Inc. Ltd. This material may be distributed subject to the terms and conditions set forth in the Open
Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
AUTHORS
opengl.org
opengl.org 06/10/2014 GLSHADERSOURCE(3G)