commit 473ed32bda24ea5a5b68aa5788904b4625791c69
parent 5fb0db071e47ad8dcf06a9a89fffc62c2e6f77d3
Author: Michael Froman <mfroman@mozilla.com>
Date: Tue, 18 Nov 2025 22:29:08 +0000
Bug 2000353 - remove unused files c2ru.{c|h} r=bwc,ng
Differential Revision: https://phabricator.services.mozilla.com/D272746
Diffstat:
3 files changed, 0 insertions(+), 418 deletions(-)
diff --git a/dom/media/webrtc/transport/third_party/nrappkit/nrappkit.gyp b/dom/media/webrtc/transport/third_party/nrappkit/nrappkit.gyp
@@ -72,8 +72,6 @@
'./src/log/r_log.h',
# Registry
- './src/registry/c2ru.c',
- './src/registry/c2ru.h',
'./src/registry/registry.c',
'./src/registry/registry.h',
'./src/registry/registry_int.h',
diff --git a/dom/media/webrtc/transport/third_party/nrappkit/src/registry/c2ru.c b/dom/media/webrtc/transport/third_party/nrappkit/src/registry/c2ru.c
@@ -1,320 +0,0 @@
-/*
- *
- * c2ru.c
- *
- * $Source: /Users/ekr/tmp/nrappkit-dump/nrappkit/src/registry/c2ru.c,v $
- * $Revision: 1.3 $
- * $Date: 2007/06/26 22:37:50 $
- *
- * c2r utility methods
- *
- *
- * Copyright (C) 2005, Network Resonance, Inc.
- * Copyright (C) 2006, Network Resonance, Inc.
- * All Rights Reserved
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Network Resonance, Inc. nor the name of any
- * contributors to this software may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- *
- */
-
-#include <sys/queue.h>
-#include <string.h>
-#include <registry.h>
-#include "nr_common.h"
-#include <r_errors.h>
-#include <r_macros.h>
-#include <ctype.h>
-#include "c2ru.h"
-
-
-#define NRGET(func, type, get) \
-int \
-func(NR_registry parent, char *child, type **out) \
-{ \
- int r, _status; \
- NR_registry registry; \
- type tmp; \
- \
- if ((r = nr_c2ru_make_registry(parent, child, registry))) \
- ABORT(r); \
- \
- if ((r = get(registry, &tmp))) { \
- if (r != R_NOT_FOUND) \
- ABORT(r); \
- *out = 0; \
- } \
- else { \
- *out = RCALLOC(sizeof(tmp)); \
- if (*out == 0) \
- ABORT(R_NO_MEMORY); \
- **out = tmp; \
- } \
- \
- _status = 0; \
-abort: \
- return (_status); \
-}
-
-int
-nr_c2ru_get_char(NR_registry parent, char *child, char **out)
-{
- int r, _status;
- NR_registry registry;
- char tmp;
-
- if ((r = nr_c2ru_make_registry(parent, child, registry)))
- ABORT(r);
-
- if ((r = NR_reg_get_char(registry, &tmp))) {
- if (r != R_NOT_FOUND)
- ABORT(r);
- *out = 0;
- }
- else {
- *out = RCALLOC(sizeof(tmp));
- if (*out == 0)
- ABORT(R_NO_MEMORY);
- **out = tmp;
- }
-
- _status = 0;
-abort:
- return (_status);
-}
-NRGET(nr_c2ru_get_uchar, UCHAR, NR_reg_get_uchar)
-NRGET(nr_c2ru_get_int2, INT2, NR_reg_get_int2)
-NRGET(nr_c2ru_get_uint2, UINT2, NR_reg_get_uint2)
-NRGET(nr_c2ru_get_int4, INT4, NR_reg_get_int4)
-NRGET(nr_c2ru_get_uint4, UINT4, NR_reg_get_uint4)
-NRGET(nr_c2ru_get_int8, INT8, NR_reg_get_int8)
-NRGET(nr_c2ru_get_uint8, UINT8, NR_reg_get_uint8)
-NRGET(nr_c2ru_get_double, double, NR_reg_get_double)
-NRGET(nr_c2ru_get_string, char*, NR_reg_alloc_string)
-NRGET(nr_c2ru_get_data, Data, NR_reg_alloc_data)
-
-
-#define NRSET(func, type, set) \
-int \
-func(NR_registry parent, char *child, type *in) \
-{ \
- int r, _status; \
- NR_registry registry; \
- \
- if (in == 0) \
- return 0; \
- \
- if ((r = nr_c2ru_make_registry(parent, child, registry))) \
- ABORT(r); \
- \
- if ((r = set(registry, *in))) \
- ABORT(r); \
- \
- _status = 0; \
-abort: \
- return (_status); \
-}
-
-NRSET(nr_c2ru_set_char, char, NR_reg_set_char)
-NRSET(nr_c2ru_set_uchar, UCHAR, NR_reg_set_uchar)
-NRSET(nr_c2ru_set_int2, INT2, NR_reg_set_int2)
-NRSET(nr_c2ru_set_uint2, UINT2, NR_reg_set_uint2)
-NRSET(nr_c2ru_set_int4, INT4, NR_reg_set_int4)
-NRSET(nr_c2ru_set_uint4, UINT4, NR_reg_set_uint4)
-NRSET(nr_c2ru_set_int8, INT8, NR_reg_set_int8)
-NRSET(nr_c2ru_set_uint8, UINT8, NR_reg_set_uint8)
-NRSET(nr_c2ru_set_double, double, NR_reg_set_double)
-NRSET(nr_c2ru_set_string, char*, NR_reg_set_string)
-
-int
-nr_c2ru_set_data(NR_registry parent, char *child, Data *in)
-{
- int r, _status;
- NR_registry registry;
-
- if (in == 0)
- return 0;
-
- if ((r = nr_c2ru_make_registry(parent, child, registry)))
- ABORT(r);
-
- if ((r = NR_reg_set_bytes(registry, in->data, in->len)))
- ABORT(r);
-
- _status = 0;
-abort:
- return (_status);
-}
-
-#define NRFREE(func, type) \
-int \
-func(type *in) \
-{ \
- if (in) \
- RFREE(in); \
- return 0; \
-}
-
-NRFREE(nr_c2ru_free_char, char)
-NRFREE(nr_c2ru_free_uchar, UCHAR)
-NRFREE(nr_c2ru_free_int2, INT2)
-NRFREE(nr_c2ru_free_uint2, UINT2)
-NRFREE(nr_c2ru_free_int4, INT4)
-NRFREE(nr_c2ru_free_uint4, UINT4)
-NRFREE(nr_c2ru_free_int8, INT8)
-NRFREE(nr_c2ru_free_uint8, UINT8)
-NRFREE(nr_c2ru_free_double, double)
-
-
-int
-nr_c2ru_free_string(char **in)
-{
- if (*in)
- RFREE(*in);
- if (in)
- RFREE(in);
- return 0;
-}
-
-int
-nr_c2ru_free_data(Data *in)
-{
- int r, _status;
-
- if (in) {
- if ((r=r_data_destroy(&in)))
- ABORT(r);
- }
-
- _status = 0;
-abort:
- return (_status);
-}
-
-int
-nr_c2ru_get_children(NR_registry parent, char *child, void *ptr, size_t size, int (*get)(NR_registry, void*))
-{
- int r, _status;
- NR_registry registry;
- unsigned int count;
- unsigned int i;
- NR_registry name;
- struct entry { TAILQ_ENTRY(entry) entries; } *entry;
- TAILQ_HEAD(, entry) *tailq = (void*)ptr;
-
- TAILQ_INIT(tailq);
-
- if ((r=nr_c2ru_make_registry(parent, child, registry)))
- ABORT(r);
-
- if ((r=NR_reg_get_child_count(registry, &count))) {
- if (r != R_NOT_FOUND)
- ABORT(r);
- }
- else {
- for (i = 0; i < count; ++i) {
- if ((r=NR_reg_get_child_registry(registry, i, name))) {
- /* ignore R_NOT_FOUND errors */
- if (r == R_NOT_FOUND)
- continue;
- else
- ABORT(r);
- }
-
- if ((r=get(name, &entry))) {
- /* ignore R_NOT_FOUND errors */
- if (r == R_NOT_FOUND)
- continue;
- else
- ABORT(r);
- }
-
- TAILQ_INSERT_TAIL(tailq, entry, entries);
- }
- }
-
- _status = 0;
-abort:
- return (_status);
-}
-
-int
-nr_c2ru_set_children(NR_registry parent, char *child, void *ptr, int (*set)(NR_registry, void*), int (*label)(NR_registry, void*, char[NR_REG_MAX_NR_REGISTRY_LEN]))
-{
- int r, _status;
- NR_registry registry;
- int i;
- NR_registry name;
- char buffer[NR_REG_MAX_NR_REGISTRY_LEN];
- struct entry { TAILQ_ENTRY(entry) entries; } *entry;
- TAILQ_HEAD(, entry) *tailq = (void*)ptr;
-
- if ((r=nr_c2ru_make_registry(parent, child, registry)))
- ABORT(r);
-
- (void)NR_reg_del(registry);
-
- i = 0;
- TAILQ_FOREACH(entry, tailq, entries) {
- if (label == 0 || (r=label(registry, entry, buffer))) {
- snprintf(buffer, sizeof(buffer), "%d", i);
- }
- if ((r=nr_c2ru_make_registry(registry, buffer, name)))
- ABORT(r);
-
- if ((r=set(name, entry)))
- ABORT(r);
-
- ++i;
- }
-
- _status = 0;
-abort:
- return (_status);
-}
-
-int
-nr_c2ru_free_children(void *ptr, int (*free)(void*))
-{
- struct entry { TAILQ_ENTRY(entry) entries; } *entry;
- TAILQ_HEAD(, entry) *tailq = (void*)ptr;
-
- while (! TAILQ_EMPTY(tailq)) {
- entry = TAILQ_FIRST(tailq);
- TAILQ_REMOVE(tailq, entry, entries);
- (void)free(entry);
- }
-
- return 0;
-}
-
-/* requires parent already in legal form */
-int
-nr_c2ru_make_registry(NR_registry parent, char *child, NR_registry out)
-{
- return NR_reg_make_registry(parent, child, out);
-}
diff --git a/dom/media/webrtc/transport/third_party/nrappkit/src/registry/c2ru.h b/dom/media/webrtc/transport/third_party/nrappkit/src/registry/c2ru.h
@@ -1,96 +0,0 @@
-/*
- *
- * c2ru.h
- *
- * $Source: /Users/ekr/tmp/nrappkit-dump/nrappkit/src/registry/c2ru.h,v $
- * $Revision: 1.2 $
- * $Date: 2006/08/16 19:39:13 $
- *
- * c2r utility methods
- *
- *
- * Copyright (C) 2005, Network Resonance, Inc.
- * Copyright (C) 2006, Network Resonance, Inc.
- * All Rights Reserved
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Network Resonance, Inc. nor the name of any
- * contributors to this software may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- *
- */
-
-#ifndef __C2RU_H__
-#define __C2RU_H__
-
-#include <sys/types.h>
-#include <r_types.h>
-#include <r_data.h>
-#include "registry_int.h"
-
-int nr_c2ru_get_char(NR_registry parent, char *child, char **out);
-int nr_c2ru_get_uchar(NR_registry parent, char *child, UCHAR **out);
-int nr_c2ru_get_int2(NR_registry parent, char *child, INT2 **out);
-int nr_c2ru_get_uint2(NR_registry parent, char *child, UINT2 **out);
-int nr_c2ru_get_int4(NR_registry parent, char *child, INT4 **out);
-int nr_c2ru_get_uint4(NR_registry parent, char *child, UINT4 **out);
-int nr_c2ru_get_int8(NR_registry parent, char *child, INT8 **out);
-int nr_c2ru_get_uint8(NR_registry parent, char *child, UINT8 **out);
-int nr_c2ru_get_double(NR_registry parent, char *child, double **out);
-int nr_c2ru_get_data(NR_registry parent, char *child, Data **out);
-int nr_c2ru_get_string(NR_registry parent, char *child, char ***out);
-
-int nr_c2ru_set_char(NR_registry parent, char *child, char *data);
-int nr_c2ru_set_uchar(NR_registry parent, char *child, UCHAR *data);
-int nr_c2ru_set_int2(NR_registry parent, char *child, INT2 *data);
-int nr_c2ru_set_uint2(NR_registry parent, char *child, UINT2 *data);
-int nr_c2ru_set_int4(NR_registry parent, char *child, INT4 *data);
-int nr_c2ru_set_uint4(NR_registry parent, char *child, UINT4 *data);
-int nr_c2ru_set_int8(NR_registry parent, char *child, INT8 *data);
-int nr_c2ru_set_uint8(NR_registry parent, char *child, UINT8 *data);
-int nr_c2ru_set_double(NR_registry parent, char *child, double *data);
-int nr_c2ru_set_registry(NR_registry parent, char *child);
-int nr_c2ru_set_data(NR_registry parent, char *child, Data *data);
-int nr_c2ru_set_string(NR_registry parent, char *child, char **data);
-
-int nr_c2ru_free_char(char *data);
-int nr_c2ru_free_uchar(UCHAR *data);
-int nr_c2ru_free_int2(INT2 *data);
-int nr_c2ru_free_uint2(UINT2 *data);
-int nr_c2ru_free_int4(INT4 *data);
-int nr_c2ru_free_uint4(UINT4 *data);
-int nr_c2ru_free_int8(INT8 *data);
-int nr_c2ru_free_uint8(UINT8 *data);
-int nr_c2ru_free_double(double *data);
-int nr_c2ru_free_data(Data *data);
-int nr_c2ru_free_string(char **data);
-
-int nr_c2ru_get_children(NR_registry parent, char *child, void *ptr, size_t size, int (*get)(NR_registry, void*));
-int nr_c2ru_set_children(NR_registry parent, char *child, void *ptr, int (*set)(NR_registry, void*), int (*label)(NR_registry, void*, char[NR_REG_MAX_NR_REGISTRY_LEN]));
-int nr_c2ru_free_children(void *ptr, int (*free)(void*));
-
-int nr_c2ru_make_registry(NR_registry parent, char *child, NR_registry out);
-
-#endif