Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  generate-errcodes.pl

  Sprache: Shell
 

#!/usr/bin/perl
#
# Generate the errcodes.h header from errcodes.txt
# Copyright (c) 2000-2025, PostgreSQL Global Development Group

use strict;
use warnings FATAL => 'all';
use Getopt::Long;

my $outfile = '';

GetOptions('outfile=s' => \$outfile) or die "$0: wrong arguments";

open my $errcodes, '<', $ARGV[0]
  or die "$0: could not open input file '$ARGV[0]': $!\n";

my $outfh;
if ($outfile)
{
 open $outfh, '>', $outfile
   or die "$0: could not open output file '$outfile': $!\n";
}
else
{
 $outfh = *STDOUT;
}

print $outfh
  "/* autogenerated from src/backend/utils/errcodes.txt, do not edit */\n";
print $outfh "/* there is deliberately not an #ifndef ERRCODES_H here */\n";


while (<$errcodes>)
{
 chomp;

 # Skip comments
 next if /^#/;
 next if /^\s*$/;

 # Emit a comment for each section header
 if (/^Section:(.*)/)
 {
  my $header = $1;
  $header =~ s/^\s+//;
  print $outfh "\n/* $header */\n";
  next;
 }

 die "unable to parse errcodes.txt"
   unless /^([^\s]{5})\s+[EWS]\s+([^\s]+)/;

 (my $sqlstate, my $errcode_macro) = ($1, $2);

 # Split the sqlstate letters
 $sqlstate = join ",", split "", $sqlstate;

 # And quote them
 $sqlstate =~ s/([^,])/'$1'/g;

 print $outfh "#define $errcode_macro MAKE_SQLSTATE($sqlstate)\n";
}

close $errcodes;
close $outfh if ($outfile);

Messung V0.5 in Prozent
C=93 H=98 G=95

¤ Dauer der Verarbeitung: 0.15 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=141584
#Domains=752002