Sponsored Content
Top Forums UNIX for Advanced & Expert Users Detecting unused variables... Post 302973523 by Corona688 on Wednesday 18th of May 2016 10:14:36 AM
Old 05-18-2016
Quote:
Originally Posted by wisecracker
As for the rest my code is designed to be as "bash" backwards compatible as is possible, and I am ignoring the 'printf' statements as errors.
Backwards compatible with what? It's already meant for bash, so I assume you mean sh... You store binary data in shell variables -- I wouldn't trust that to work in anything but brand-name BASH, and very modern BASH at that.

The problems it flags with printf are all legit, btw. What would happen if your binary data included a meaningless % character, just incidentally? printf would bomb, that's what, because % is not meaningless to printf. printf "%s" "$data" avoids that problem.
This User Gave Thanks to Corona688 For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do I get the unused space?

One of my Solaris 8 machines hd was about to die. So I used g4u to create an image of the 9gb drive and I put it in a 36gb drive. That solved my dieing hd problem. But.... How do I get my machine to see the unused 27gb of space? Any help would be greatly appreciated. (1 Reply)
Discussion started by: Spyzic
1 Replies

2. AIX

unused storage on AIX 4.3

Hi, How do I query for unused partition in AIX 4.3 with DAS and SAA storage? I know most unix administrator don't put all the capacity on the system at once. thanks, vene (1 Reply)
Discussion started by: venerayan
1 Replies

3. UNIX for Dummies Questions & Answers

delete the unused file

Hi All, Can you please let me know how to delete any files that have not been accessed in the past 28 days in a directory. Thanks, Arun (3 Replies)
Discussion started by: arunkumar_mca
3 Replies

4. AIX

how to clean Unused semaphore??

How can i clean up my unused semaphore??? (4 Replies)
Discussion started by: abhishek27
4 Replies

5. HP-UX

HP-UX using unused HDD space

Hello, I have a system with HP-UX 11.23 installed on it. There are ~36GB of unused space on the HDD. I did a very basic installation, and it created the usual volume group /dev/vg00. When I look at the output of ioscan -funC disk, I see this (and more, but irrelevant to this post): disk ... (1 Reply)
Discussion started by: goon12
1 Replies

6. Solaris

unused disk space

i Have alloted 20G in my vmware for solaris 10, upon installation, and some distribution of disk space to /,/opt,swap i just use 19G. Can i still use the 1G? How? how to see the 1G? that i did not use? how can i use it? appreciate your responce (17 Replies)
Discussion started by: kenshinhimura
17 Replies

7. AIX

Temporarily disabling unused ethernet adapter

Hi, In our AIX 5.2 server , we have one unused ethernet adapter which doesn't have cable connection . For this interface , we are getting alerts in errpt . Could you suggesthow to stop this alert ? And sametime i would like to keep this device in ODM . Is there... (1 Reply)
Discussion started by: sekarsamy
1 Replies

8. Programming

What Unix do with unused shared memory?

Hello, When creating shared memory in C, should be remove shared memory with shmctl function when don't need it. If it didn't remove, occupied shared memory stay and remain. If we create shared memory repeatedly without removing unusable shared memory, /dev/shm will full. Does Unix or... (1 Reply)
Discussion started by: pronetin
1 Replies

9. Solaris

Solaris 10: how to disable an unused HBA card

Dear all, I have a new Oracle Blade X4-2B server, running Solaris 10. The server comes with a HBA card that will not be used now. It has not fibers connected to it. As a consequence, its leds never stop flashing. My question is: how to disable this HBA card, without removing it physically... (2 Replies)
Discussion started by: Gus1971
2 Replies
GLGETPROGRAMRESOURCE(3G)					   OpenGL Manual					  GLGETPROGRAMRESOURCE(3G)

NAME
glGetProgramResourceIndex - query the index of a named resource within a program C SPECIFICATION
GLuint glGetProgramResourceIndex(GLuint program, GLenum programInterface, const char * name); PARAMETERS
program The name of a program object whose resources to query. programInterface A token identifying the interface within program containing the resource named name. name The name of the resource to query the index of. DESCRIPTION
glGetProgramResourceIndex returns the unsigned integer index assigned to a resource named name in the interface type programInterface of program object program. program must be the name of an existing program object. programInterface is the name of the interface within program which contains the resource named nameand must be one of the following values: GL_UNIFORM The query is targeted at the set of active uniforms within program. GL_UNIFORM_BLOCK The query is targeted at the set of active uniform blocks within program. GL_PROGRAM_INPUT The query is targeted at the set of active input variables used by the first shader stage of program. If program contains multiple shader stages then input variables from any stage other than the first will not be enumerated. GL_PROGRAM_OUTPUT The query is targeted at the set of active output variables produced by the last shader stage of program. If program contains multiple shader stages then output variables from any stage other than the last will not be enumerated. GL_VERTEX_SUBROUTINE, GL_TESS_CONTROL_SUBROUTINE, GL_TESS_EVALUATION_SUBROUTINE, GL_GEOMETRY_SUBROUTINE, GL_FRAGMENT_SUBROUTINE, GL_COMPUTE_SUBROUTINE , , , , , The query is targeted at the set of active subroutines for the vertex, tessellation control, tessellation evaluation, geometry, fragment and compute shader stages of program, respectively. GL_VERTEX_SUBROUTINE_UNIFORM, GL_TESS_CONTROL_SUBROUTINE_UNIFORM, GL_TESS_EVALUATION_SUBROUTINE_UNIFORM, GL_GEOMETRY_SUBROUTINE_UNIFORM, GL_FRAGMENT_SUBROUTINE_UNIFORM, GL_COMPUTE_SUBROUTINE_UNIFORM , , , , , The query is targeted at the set of active subroutine uniform variables used by the vertex, tessellation control, tessellation evaluation, geometry, fragment and compute shader stages of program, respectively. GL_TRANSFORM_FEEDBACK_VARYING The query is targeted at the set of output variables from the last non-fragment stage of program that would be captured if transform feedback were active. GL_BUFFER_VARIABLE The query is targeted at the set of active buffer variables used by program. GL_SHADER_STORAGE_BLOCK The query is targeted at the set of active shader storage blocks used by program. If name exactly matches the name string of one of the active resources for programInterface, the index of the matched resource is returned. Additionally, if name would exactly match the name string of an active resource if "[0]" were appended to name, the index of the matched resource is returned. Otherwise, name is considered not to be the name of an active resource, and GL_INVALID_INDEX is returned. For the interface GL_TRANSFORM_FEEDBACK_VARYING, the value GL_INVALID_INDEX should be returned when querying the index assigned to the special names gl_NextBuffer, gl_SkipComponents1, gl_SkipComponents2, gl_SkipComponents3, or gl_SkipComponents4. ERRORS
GL_INVALID_ENUM is generated if programInterface is not one of the accepted interface types. Although not an error, GL_INVALID_INDEX is returned if name is not the name of a resource within the interface identified by programInterface. SEE ALSO
glGetProgramResourceName(), glGetGetProgramResource(), glGetProgramResourceLocation(), glGetProgramResourceLocationIndex(). COPYRIGHT
Copyright (C) 2012 Khronos Group. 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 GLGETPROGRAMRESOURCE(3G)
All times are GMT -4. The time now is 09:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy