Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Gnome/gsk/gpu/shaders/   (Gnome Linux Desktop Version 4.23.2©)  Datei vom 30.5.2026 mit Größe 1 kB image not shown  

Quelle  process-glsl-includes.py

  Sprache: Python
 

#!/usr/bin/env python3

import argparse
import sys
import re
import os

loaded_files = []

check_defines = [ 'VULKAN''GSK_PREAMBLE' ]

def load (path, includes):
    if (path in loaded_files):
        return

    loaded_files.append (path)
    skipping = ''

    with open(path) as f:
        lines = f.readlines()
        for line in lines:
            if skipping:
                match = re.search (r"^#endif /\* (.*) \*/$", line)
                if match and match.group(1) == skipping:
                    skipping = ''
                continue

            match = re.search (r"^#define (.*)$", line)
            if match and match.group(1in check_defines:
                check_defines.remove (match.group(1))
                print (line, end="")
                continue

            match = re.search (r"^#ifdef (.*)$", line)
            if match and match.group(1in check_defines:
                skipping = match.group(1)
                continue

            match = re.search (r"^#include \"(.*)\"$", line)
            if match:
                for dir in [os.path.dirname(path)] + includes:
                    file = os.path.join (dir, match.group (1))
                    if not os.path.isfile (file):
                        continue
                    load (file, includes)
                    break
            else:
                print (line, end="")

parser = argparse.ArgumentParser()
parser.add_argument ('-I''--include', type=str, action='append', help='Add include directory')
parser.add_argument ('FILES', nargs='*', help='Input files')
args = parser.parse_args()

for path in args.FILES:
    load (path, args.include if args.include else [])


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

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-07-02) ¤

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