summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Torri <storri@users.sourceforge.net>2002-11-11 04:18:41 +0000
committerStephen Torri <storri@users.sourceforge.net>2002-11-11 04:18:41 +0000
commitfd6049f21bda4270509364e14a111cdb78dea0db (patch)
treea2b04e174bc0e710bc4b7e8328f01b316a85d96b
parent076b96c2af06cc691be548e9851d65d3407cadca (diff)
downloadxine-lib-fd6049f21bda4270509364e14a111cdb78dea0db.tar.gz
xine-lib-fd6049f21bda4270509364e14a111cdb78dea0db.tar.bz2
Updated so that the function set_hc_result is now private to the file.
CVS patchset: 3229 CVS date: 2002/11/11 04:18:41
-rw-r--r--src/xine-utils/xine_check.c97
-rw-r--r--src/xine-utils/xine_check.h3
2 files changed, 50 insertions, 50 deletions
diff --git a/src/xine-utils/xine_check.c b/src/xine-utils/xine_check.c
index ed0911b64..867bdb1d0 100644
--- a/src/xine-utils/xine_check.c
+++ b/src/xine-utils/xine_check.c
@@ -94,6 +94,56 @@ xine_health_check_t* xine_health_check (xine_health_check_t* hc, int check_num)
return hc;
}
+static void set_hc_result(xine_health_check_t* hc, int state, char *format, ...) {
+
+ va_list args;
+ char *buf = NULL;
+ int n, size;
+
+ if (!hc) {
+ printf("%s() GASP, hc is NULL\n", __XINE_FUNCTION__);
+ abort();
+ }
+
+ if (!format) {
+ printf("%s() GASP, format is NULL\n", __XINE_FUNCTION__);
+ abort();
+ }
+
+ size = strlen(format) + 1;
+
+ if((buf = malloc(size)) == NULL) {
+ printf("%s() GASP, malloc() failed\n", __XINE_FUNCTION__);
+ abort();
+ }
+
+ while(1) {
+ va_start(args, format);
+ n = vsnprintf(buf, size, format, args);
+ va_end(args);
+
+ if(n > -1 && n < size) {
+ break;
+ }
+
+ if(n > -1) {
+ size = n + 1;
+ }
+ else {
+ size *= 2;
+ }
+
+ if((buf = realloc(buf, size)) == NULL) {
+ printf("%s() GASP, realloc() failed\n", __XINE_FUNCTION__);
+ abort();
+ }
+ }
+
+ hc->msg = buf;
+ hc->status = state;
+}
+
+
xine_health_check_t* xine_health_check_kernel (xine_health_check_t* hc) {
struct utsname kernel;
@@ -361,51 +411,4 @@ xine_health_check_t* xine_health_check (xine_health_check_t* hc, int check_num)
}
#endif /* !__linux__ */
-static void set_hc_result(xine_health_check_t* hc, int state, char *format, ...) {
-
- va_list args;
- char *buf = NULL;
- int n, size;
-
- if (!hc) {
- printf("%s() GASP, hc is NULL\n", __XINE_FUNCTION__);
- abort();
- }
-
- if (!format) {
- printf("%s() GASP, format is NULL\n", __XINE_FUNCTION__);
- abort();
- }
-
- size = strlen(format) + 1;
-
- if((buf = malloc(size)) == NULL) {
- printf("%s() GASP, malloc() failed\n", __XINE_FUNCTION__);
- abort();
- }
-
- while(1) {
- va_start(args, format);
- n = vsnprintf(buf, size, format, args);
- va_end(args);
-
- if(n > -1 && n < size) {
- break;
- }
-
- if(n > -1) {
- size = n + 1;
- }
- else {
- size *= 2;
- }
-
- if((buf = realloc(buf, size)) == NULL) {
- printf("%s() GASP, realloc() failed\n", __XINE_FUNCTION__);
- abort();
- }
- }
- hc->msg = buf;
- hc->status = state;
-}
diff --git a/src/xine-utils/xine_check.h b/src/xine-utils/xine_check.h
index 594e1bad4..64c72eef1 100644
--- a/src/xine-utils/xine_check.h
+++ b/src/xine-utils/xine_check.h
@@ -45,8 +45,5 @@ xine_health_check_t* xine_health_check_x(xine_health_check_t*);
/* health_check Xv extension */
xine_health_check_t* xine_health_check_xv(xine_health_check_t*);
-/* Format message string */
-/* Format must not be NULL */
-static void set_hc_result (xine_health_check_t* hc, int state, char *format, ...);
#endif