diff options
Diffstat (limited to 'src/libXNVCtrlAttributes')
-rw-r--r-- | src/libXNVCtrlAttributes/NvCtrlAttributes.c | 16 | ||||
-rw-r--r-- | src/libXNVCtrlAttributes/NvCtrlAttributes.h | 6 | ||||
-rw-r--r-- | src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c | 6 | ||||
-rw-r--r-- | src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h | 4 |
4 files changed, 15 insertions, 17 deletions
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributes.c b/src/libXNVCtrlAttributes/NvCtrlAttributes.c index 6970a3f..e168a20 100644 --- a/src/libXNVCtrlAttributes/NvCtrlAttributes.c +++ b/src/libXNVCtrlAttributes/NvCtrlAttributes.c @@ -516,7 +516,7 @@ ReturnStatus NvCtrlGetStringAttribute(NvCtrlAttributeHandle *handle, ReturnStatus NvCtrlSetStringAttribute(NvCtrlAttributeHandle *handle, - int attr, char *ptr, int *ret) + int attr, const char *ptr, int *ret) { if (!handle) return NvCtrlBadArgument; return NvCtrlSetStringDisplayAttribute(handle, 0, attr, ptr, ret); @@ -795,7 +795,7 @@ NvCtrlGetStringDisplayAttribute(NvCtrlAttributeHandle *handle, ReturnStatus NvCtrlSetStringDisplayAttribute(NvCtrlAttributeHandle *handle, unsigned int display_mask, - int attr, char *ptr, int *ret) + int attr, const char *ptr, int *ret) { NvCtrlAttributePrivateHandle *h; @@ -808,8 +808,7 @@ NvCtrlSetStringDisplayAttribute(NvCtrlAttributeHandle *handle, } return NvCtrlNoAttribute; - -} /* NvCtrlSetStringDisplayAttribute() */ +} ReturnStatus @@ -829,12 +828,12 @@ NvCtrlGetBinaryAttribute(NvCtrlAttributeHandle *handle, ReturnStatus NvCtrlStringOperation(NvCtrlAttributeHandle *handle, unsigned int display_mask, int attr, - char *ptrIn, char **ptrOut) + const char *ptrIn, char **ptrOut) { NvCtrlAttributePrivateHandle *h; - + h = (NvCtrlAttributePrivateHandle *) handle; - + if ((attr >= 0) && (attr <= NV_CTRL_STRING_OPERATION_LAST_ATTRIBUTE)) { if (!h->nv) return NvCtrlMissingExtension; return NvCtrlNvControlStringOperation(h, display_mask, attr, ptrIn, @@ -842,8 +841,7 @@ NvCtrlStringOperation(NvCtrlAttributeHandle *handle, } return NvCtrlNoAttribute; - -} /* NvCtrlStringOperation() */ +} char *NvCtrlAttributesStrError(ReturnStatus status) diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributes.h b/src/libXNVCtrlAttributes/NvCtrlAttributes.h index bfb51d2..72c3c51 100644 --- a/src/libXNVCtrlAttributes/NvCtrlAttributes.h +++ b/src/libXNVCtrlAttributes/NvCtrlAttributes.h @@ -393,7 +393,7 @@ ReturnStatus NvCtrlGetStringAttribute (NvCtrlAttributeHandle *handle, */ ReturnStatus NvCtrlSetStringAttribute (NvCtrlAttributeHandle *handle, - int attr, char *ptr, int *ret); + int attr, const char *ptr, int *ret); /* * The following four functions are identical to the above five, @@ -438,7 +438,7 @@ NvCtrlGetStringDisplayAttribute (NvCtrlAttributeHandle *handle, ReturnStatus NvCtrlSetStringDisplayAttribute (NvCtrlAttributeHandle *handle, unsigned int display_mask, - int attr, char *ptr, int *ret); + int attr, const char *ptr, int *ret); ReturnStatus NvCtrlGetBinaryAttribute(NvCtrlAttributeHandle *handle, @@ -455,7 +455,7 @@ NvCtrlGetBinaryAttribute(NvCtrlAttributeHandle *handle, ReturnStatus NvCtrlStringOperation(NvCtrlAttributeHandle *handle, unsigned int display_mask, int attr, - char *ptrIn, char **ptrOut); + const char *ptrIn, char **ptrOut); /* * NvCtrl[SG]etGvoColorConversion() - get and set the color conversion diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c b/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c index 1e75ce4..1695fd6 100644 --- a/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c +++ b/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c @@ -336,7 +336,7 @@ NvCtrlNvControlGetStringAttribute (NvCtrlAttributePrivateHandle *h, ReturnStatus NvCtrlNvControlSetStringAttribute (NvCtrlAttributePrivateHandle *h, unsigned int display_mask, - int attr, char *ptr, int *ret) + int attr, const char *ptr, int *ret) { int tmp_int; /* Temp storage if ret is not specified */ @@ -357,7 +357,7 @@ NvCtrlNvControlSetStringAttribute (NvCtrlAttributePrivateHandle *h, return NvCtrlAttributeNotAvailable; } } - + return NvCtrlNoAttribute; } /* NvCtrlNvControlSetStringAttribute() */ @@ -393,7 +393,7 @@ NvCtrlNvControlGetBinaryAttribute(NvCtrlAttributePrivateHandle *h, ReturnStatus NvCtrlNvControlStringOperation(NvCtrlAttributePrivateHandle *h, unsigned int display_mask, int attr, - char *ptrIn, char **ptrOut) + const char *ptrIn, char **ptrOut) { if (attr <= NV_CTRL_STRING_OPERATION_LAST_ATTRIBUTE) { if (XNVCTRLStringOperation (h->dpy, h->target_type, diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h b/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h index 538f6b2..3e9df16 100644 --- a/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h +++ b/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h @@ -268,7 +268,7 @@ NvCtrlNvControlGetStringAttribute (NvCtrlAttributePrivateHandle *, ReturnStatus NvCtrlNvControlSetStringAttribute (NvCtrlAttributePrivateHandle *, - unsigned int, int, char *, int *); + unsigned int, int, const char *, int *); ReturnStatus NvCtrlNvControlGetBinaryAttribute(NvCtrlAttributePrivateHandle *h, @@ -278,7 +278,7 @@ NvCtrlNvControlGetBinaryAttribute(NvCtrlAttributePrivateHandle *h, ReturnStatus NvCtrlNvControlStringOperation (NvCtrlAttributePrivateHandle *h, unsigned int display_mask, int attr, - char *ptrIn, char **ptrOut); + const char *ptrIn, char **ptrOut); /* helper functions for XV86VidMode and RandR backends */ |