X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=sim%2Fe2-interface.git;a=blobdiff_plain;f=e2sim%2Fprevious%2FASN1c%2Fasn_SEQUENCE_OF.c;fp=e2sim%2Fprevious%2FASN1c%2Fasn_SEQUENCE_OF.c;h=0000000000000000000000000000000000000000;hp=a231462e07c526ef716f6ca4866b306c75324828;hb=f86662b5b6481f27e18313a36355871f3a947193;hpb=a9f02a2b5886990fd81e64f7c218c5d4844f18a3 diff --git a/e2sim/previous/ASN1c/asn_SEQUENCE_OF.c b/e2sim/previous/ASN1c/asn_SEQUENCE_OF.c deleted file mode 100644 index a231462..0000000 --- a/e2sim/previous/ASN1c/asn_SEQUENCE_OF.c +++ /dev/null @@ -1,59 +0,0 @@ -/***************************************************************************** -# * -# Copyright 2019 AT&T Intellectual Property * -# * -# Licensed under the Apache License, Version 2.0 (the "License"); * -# you may not use this file except in compliance with the License. * -# You may obtain a copy of the License at * -# * -# http://www.apache.org/licenses/LICENSE-2.0 * -# * -# Unless required by applicable law or agreed to in writing, software * -# distributed under the License is distributed on an "AS IS" BASIS, * -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -# See the License for the specific language governing permissions and * -# limitations under the License. * -# * -******************************************************************************/ - -/*- - * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. - * Redistribution and modifications are permitted subject to BSD license. - */ -#include -#include - -typedef A_SEQUENCE_OF(void) asn_sequence; - -void -asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free) { - asn_sequence *as = (asn_sequence *)asn_sequence_of_x; - - if(as) { - void *ptr; - int n; - - if(number < 0 || number >= as->count) - return; /* Nothing to delete */ - - if(_do_free && as->free) { - ptr = as->array[number]; - } else { - ptr = 0; - } - - /* - * Shift all elements to the left to hide the gap. - */ - --as->count; - for(n = number; n < as->count; n++) - as->array[n] = as->array[n+1]; - - /* - * Invoke the third-party function only when the state - * of the parent structure is consistent. - */ - if(ptr) as->free(ptr); - } -} -