Mkd (Unix-Befehl)

De Wiki EELL.

(Différences entre les versions)
m (References : Update)
m (Externe links : Liens OK)
Ligne 183 : Ligne 183 :
Finden Sie unter [[#Externe links|'''Externe links''']]
Finden Sie unter [[#Externe links|'''Externe links''']]
-
== Externe links ==
+
== Intern links ==
Verfügbarkeit der Quellen :  
Verfügbarkeit der Quellen :  
Ligne 197 : Ligne 197 :
[http://edeulo.free.fr/wiki/index.php/Mkd Downloads] für [[Debian]] und [[Ubuntu]] Software-Bibliothek
[http://edeulo.free.fr/wiki/index.php/Mkd Downloads] für [[Debian]] und [[Ubuntu]] Software-Bibliothek
-->
-->
 +
== Externe links ==
 +
[[wikipedia:en:Mkd_(Unix_command)]]
 +
 +
[[wikipedia:fr:Mkd (Commande Unix]]
 +
== References ==
== References ==
<references />
<references />

Version du 7 mars 2013 à 16:38

mkd ist ein Unix-Befehl für extrahieren kodierte Kommentaren und für Erzeugung Software Dokumentation nach ISO[1] Standards.

mkd ist die Abkürzung von make documentation. Dieser Befehl wurde ursprünglich unter dem Namen mkdoc (make documentation)[2].

Dieser Befehl wird nicht in die Unix / Linux Standard-Distributionen integriert.

Sommaire

Kommandozeile

Syntax

Kommandozeile in Terminal oder in Konsole :

mkd [-ABCFPSafjlnpstw] Codes Quellpfad [Zieldatei]

Syntax-Fehler

mkd (mit ohne Argumente), Generiert einen Syntaxfehler und zeigt die Syntax zum Konsole :

Syntax: mkd [-ABCFPSafjlnpstvw] char_codes path_source [path_target]
    or: mkd \? .See also nanual: 'man mkd'

Hilfe

mkd \? Zeigt die Syntax und den Charakter CD1 bis CD5 Kompiliert. (Mit den Optionen l und p verwendet) :

Syntax: mkd [-ABCFPSafjlnpstvw] Code Quellpfad [Zieldatei]
  oder: mkd \? . Siehe auch im Handbuch 'Mann MKD'
-> Optionen:
     -A       Stil Assembler (Dekodiert nur Kommentare in Assembler Stil)
     -B       Stil Basic
     -C       Stil C: C, C + +, PHP ...
     -F       Stil Fortran
     -P       Stil Pascal
     -S       Stil Shell
     -a fügt die Zieldatei
     -f:
         sucht Programmiersprache (. s. S. c. h. i. f. F. r. p. sh. csh)
     -J wenn die Quelldatei ist eine Projektdatei
     -l und -p: Linie; (compil.: % oder - in der ersten Spalte oder # in der Zeile)
                Seite: (compil.: Beginnen Sie mit " und endet mit ")
     -n fügt eine Zeilennummer
     -s Kopie in der Zieldatei und Bildschirm
     Kopiert nicht den Kommentar
     -v Spricht viel (verbose)
     -w überschreibt die Zieldatei (standardmäßig ist diese Option deaktiviert)
-> Codes: alle ASCII (5 Zeichen)
                Beispiel-Code = UM, oder \*OPTw, oder '* HOS', oder '**' für alle
-> Quellpfad: Quelldatei (Option -j: Wenn die Quelldatei ist eine Projekt-Datei) 
-> Zieldatei: Pfad der Zieldatei
Beispiel: mkd -Csnv '*S' fichier.c \*.Kontrollstruktur
. Exitcode 2

Verwendung

Alle Pfade in der Anwendung sind in einer Datei Zielprojekt in alphabetischer Reihenfolge aufgeführt.

Beispiel : "ls -1 *.c > app.prj" Enthält den Pfad aller Dateien zu lesen, um die Softwaredokumentation zu generieren.
Aufmerksamkeit, ls -1 (Ziffer Eins) und nicht -l (Buchstabe 'l')'

Die Befehlszeile "mkd -Cjt H app.prj app.h" generiert die Datei mit allen Funktionen-Header.

Die Befehlszeile "mkd -Cjt D app.prj app_Funktionen.Dokumentation" generiert die Datei für die Dokumentation aller Funktionen.

Beispiel für die Anwendung

Funktion Datei

Wenn möglich, schrieben sie jede Funktion eines Programm in einer separate Datei.
Wenn die Funktionen in einer einzigen Datei gruppiert werden, wird die Dokumentation der Funktionen in der gleichen Reihenfolge wie in der Quelldatei angezeigt.

Die Funktion Datei gibt die Syntax (Header) und seine Verwendung

Beispiel für die cpp_ Funkion : in cpp_.c Datei.

/*P
     File cpp_.c
     Programmers directives (in V cycle)
     Last Date und Programmer name
*/

/*D 
	function cpp_
 -----------------------------------------------------------------------------
 ACTION:
	The cpp_ function reads the source file (pnfile) transmitted from the 
	calling function, and décodes the comments pre-encoded in lines or 
        blocks of style c++. and then writing this comments in a target file 
        (pfdoc).
        Pre-coded characters are defined in a external global table 'Codes';

	The golbal variables are 'Codes' and 'Options'.
	The 'Codes': table of 5 characters: 
		extern char codes[]; 
		They must be défined in the calling function:
		char codes[5] = {0,0,0,0,0};
	The 'Options': n,s,t,v.
		extern unsigned char n,s,t,v;
		They must be défined in the calling function:
		unsigned char n=0,s=0,t=0,v=0;
	With the options:
	n: The transcript is preceded by line number. This allows to easily 
                reach the commented line.
	t: With the t option only the commented text is copied.
		Without the t option the entire line or block is copied.
		The-t option permit to generate directly exploitable and 
                publishable documents. 
	s: Add le comment to the screen to use shell redirections > , >> , 
           or || etc.
	v: Verbose mode.
	Remark:
        If the decoded comment begins with the characters "/*", the  comment
        is copied until find the characters "*/", whatever included any 
        comment-line starting with "//".
        If the decoded comment begins with the characters "//", the line is
        copied until find the end-of-line or new-line 'NL' character or 
        end-of-file 'EOF'.
        This provisions facilitate the automatic generation of header files
        (file.h ; .hpp ; etc.) and documentation of functions.

 SYNTAX:
	#include "version.h"
	#include "cpp_.h"
	int cpp_(FILE *pfdoc, FILE *pnfile);

 PORTABILITY:
	Microsoft Visual studio under Windows : x86(Win32) x64(Win32 and WIN64)
	gcc under Unix/Linux.

 DESCRIPTION:
	cpp_ fonction
	FILE * pfdoc: pointer of the target file opened by the calling function. 
	FILE * pnfile: pointer of the source file opened by the calling function

 RETURN VALUE:
	Return 0 in case of success.

 COPYRIGHT: (Specified in version.h) :
*/

/*H  
	// cpp_.c:
	extern int cpp_ (FILE * pfdoc, FILE * pnfile);
*/

     int cpp_ (FILE * pfdoc, FILE * pnfile)
     { //S Function Begin
       ... // Function Lines
     } //S Function End

Makefile

Beispiel der Zeilen in einem Makefile enthalten
In diesem Beispiel ist die Makefile ist in den Quelldateien.

APP = MyProgram # Dies ist ein "Macro"

Create_header_and_functions-doc: # hier, das ist eine bedingungslose Richtlinie. 
     if [ -e "/usr/bin/mkd" ]; \ # Achtung: das erste Zeichen ist eine Tabellierung und keine Leerzeichen.
     then \
          ls -1 *.c > $(APP).prj; \ # erstes erstellen oder zu überschreiben neue Projektdatei.
          mkd -Ctw H $(APP).prj $(APP).h; \ # erstellen oder zu überschreiben Header-Datei.
          mkd -Ctw D $(APP).prj $(APP).txt; \ # erstellen oder zu überschreiben Funktionen Dokumentation.
          mkd -CwPn w $(APP).prj $(APP).wars; \# erstellen oder zu überschreiben warnind Dokumentation für Programmierer.
     else \
          @echo "Die mkd Befehl ist nicht in bin installiert"; \
     fi

Betriebssysteme

Übersetzungen und updates

Finden Sie unter Externe links

Debian und Ubuntu

Die Pakete sind versichert für Ubuntu (und Debian)[3]

Fedora und Red Hat

Diese Anwendung wurde mit verwendet : Red_Hat, SUN-Sparc, HP-UX bis zum Jahr 2000 im Format ASCII, und danach in ISO 8859-1.

mkd ist kompilierbare als ist für Fedora. (In UTF-8-format)

Die RPM-Pakete werden nicht von Maintainers verteilt.

Andere Linux-Distributionen

Viele Linux-Distributionen sind verfügbar. mkd ist, normalerweise, kompatibel mit allen Linux und Unix-Systemen, manchmal gibt es Unterschiede in den Dokumentation Pfaden.

DOS/Windows

Befehlszeile in einem terminal cmd Dos/Windows.

Finden Sie unter Externe links

Intern links

Verfügbarkeit der Quellen :

Übersetzungen und updates

Sources für andere Systeme (Unix, Linux, Windows)

Externe links

wikipedia:en:Mkd_(Unix_command)

wikipedia:fr:Mkd (Commande Unix

References

  1. ISO/IEC 26514:2008
  2. (1986-2001) Informatique - Centre d'Electronique et de Micro-électronique de Montpellier, Université Montpellier II, 34000 Montpellier France www.cem2.univ-montp2.fr. See new laboratory IES
  3. mkd Pakete für Ubuntu und Debian


Outils personnels