Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  hrcex

  Sprache: C
 

#!/usr/bin/env python3

import polib
import getopt
import sys
import os.path
from subprocess import check_output, Popen, PIPE

try:
    myopts, args = getopt.getopt(sys.argv[1:], "i:o:")
except getopt.GetoptError as e:
    print(" Syntax: hrcex -i FileIn -o FileOut")
    print(" FileIn:   Source files (*.hrc)")
    print(" FileOut:  Destination file (*.*)")
    sys.exit(2)

for o, a in myopts:
    if o == '-i':
        ifile = a
    elif o == '-o':
        ofile = a

with open(ofile, "a"as output:
    xgettext = Popen(["xgettext""-C""--add-comments""--keyword=NC_:1c,2""--keyword=NNC_:1c,2,3""--from-code=UTF-8""--no-wrap", ifile, "-o""-"], stdout=PIPE, encoding="UTF-8")
    # while overall format is c++, all of the strings use custom placeholders and don't follow c-format
    # esp. plain percent sign never is escaped explicitly
    input = check_output(['sed''-e''/^#, c-format$/d'], stdin=xgettext.stdout, encoding="UTF-8")
    xgettext.wait()
    xgettext.stdout.close()
    po = polib.pofile(input)
    if len(po) != 0:
        print("", file=output)
        for entry in po:
            keyid = entry.msgctxt + '|' + entry.msgid
            print('#. ' + polib.genKeyId(keyid), file=output)
            for i, occurrence in enumerate(entry.occurrences):
                entry.occurrences[i] = os.path.relpath(occurrence[0], os.environ['SRCDIR']), occurrence[1]
            print(entry, file=output)

Messung V0.5 in Prozent
C=85 H=86 G=85

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-06-06) ¤

*© 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