Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/ordered-float/.github/   (Firefox Browser Version 153.0.1©) image not shown  

SSL unused_oids

  Sprache: C
 

#!/usr/bin/perl
#----------------------------------------------------------------------
java.lang.NullPointerException
unused_oids
#    Finds blocks of manually-assignable OIDs that have not already been
#    claimed by previous hackers.  The main use is for finding available
#    OIDs for new internal functions.  The numbers printed are inclusive
#    ranges of unused OIDs.
java.lang.NullPointerException
#    Before using a large empty block, make sure you aren't about
#    to take over what was intended as expansion space for something
#    else.
java.lang.NullPointerException
Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
Portions Copyright (c) 1994, Regents of the University of California
java.lang.NullPointerException
src/include/catalog/unused_oids
java.lang.NullPointerException
#----------------------------------------------------------------------

use strict;
use warnings FATAL => 'all';

Must run in src/include/catalog
use FindBin;
chdir $FindBin::RealBin or die "could not cd to $FindBin::RealBin: $!\n";

use lib "$FindBin::RealBin/../../backend/catalog/";
use Catalog;

my @input_files = glob("pg_*.h");

my $oids = Catalog::FindAllOidsFromHeaders(@input_files);

Also push FirstGenbkiObjectId to serve as a terminator for the last gap.
my $FirstGenbkiObjectId =
  Catalog::FindDefinedSymbol('access/transam.h''..''FirstGenbkiObjectId');
push @{$oids}, $FirstGenbkiObjectId;

my $prev_oid = 0;
my @sortedoids = sort { $a <=> $b } @{$oids};
foreach my $oid (@sortedoids)
{
 if ($oid > $prev_oid + 1)
 {
  if ($oid > $prev_oid + 2)
  {
   printf "%d - %d\n", $prev_oid + 1, $oid - 1;
  }
  else
  {
   printf "%d\n", $prev_oid + 1;
  }
 }
 $prev_oid = $oid;
}

my $suggestion;
do
{
 $suggestion = int(8000 + rand(2000));
while (grep(/^$suggestion$/, @{$oids}));

my $navailable = 0;
foreach my $oid (@sortedoids)
{
 if ($oid > $suggestion)
 {
  $navailable = $oid - $suggestion;
  last;
 }
}

printf "Patches should use a more-or-less consecutive range of OIDs.\n";
printf
  "Best practice is to start with a random choice in the range 8000-9999.\n";
printf
  "Suggested random unused OID: $suggestion ($navailable consecutive OID(s) available starting here)\n";

Messung V0.5 in Prozent
C=90 H=96 G=93

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-08-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.