indent

indent
indent
Importez le logo de ce logiciel
Développeur Projet GNU
Dernière version 2.2.9 (19 décembre 2002) [+/−]
Environnement UNIX, BSD, GNU/Linux
Langue Anglais uniquement
Type Indentation
Licence GNU GPL
Site web www.gnu.org/software/indent

indent est un programme libre de mise en forme de codes sources en langage C. Il modifie l'apparence d'un fichier source en ajoutant ou supprimant des espaces et des retours à la ligne.

indent fait partie du projet GNU, Il est distribué selon les termes de la licence GNU GPL.

Sommaire

Exemple

On souhaite indenter le fichier suivant :

/* exemple à indenter */
#include <stdio.h>
int main(void)
{
 char msg[] = "hello world\n";
 char * end = msg + sizeof (msg);
 char * cur;
 for(cur = msg; cur != end; ++cur) { putchar(*cur); }
 return 0;
}

Avec les paramètres par défaut, on obtient le style GNU:

#include <stdio.h>
int
main (void)
{
  char msg[] = "hello world\n";
  char *end = msg + sizeof (msg);
  char *cur;
  for (cur = msg; cur != end; ++cur)
    {
      putchar (*cur);
    }
  return 0;
}

Avec l'option -kr (pour "Kernighan and Ritchie"), on obtient :

#include <stdio.h>
int main(void)
{
    char msg[] = "hello world\n";
    char *end = msg + sizeof(msg);
    char *cur;
    for (cur = msg; cur != end; ++cur) {
        putchar(*cur);
    }
    return 0;
}

Voir aussi

Articles connexes

Lien externe


Wikimedia Foundation. 2010.

Contenu soumis à la licence CC-BY-SA. Source : Article indent de Wikipédia en français (auteurs)

Игры ⚽ Нужно сделать НИР?

Regardez d'autres dictionnaires:

  • Indent — In*dent , v. t. [imp. & p. p. {Indented}; p. pr. & vb. n. {Indenting}.] [OE. endenten to notch, fit in, OF. endenter, LL. indentare, fr. L. in + dens, dentis, tooth. See {Tooth}, and cf. {Indenture}.] [1913 Webster] 1. To notch; to jag; to cut… …   The Collaborative International Dictionary of English

  • Indent — has several meanings: * In computing, indent is a computer program that formats C programming language files with a particular indent style. See indent (Unix). * An indent can be an addition to a legal contract * Indent is a genus of moths whose… …   Wikipedia

  • Indent — Développeur Projet GNU Dernière version …   Wikipédia en Français

  • Indent — In*dent , v. i. 1. To be cut, notched, or dented. [1913 Webster] 2. To crook or turn; to wind in and out; to zigzag. [1913 Webster] 3. To contract; to bargain or covenant. Shak. [1913 Webster] To indent and drive bargains with the Almighty. South …   The Collaborative International Dictionary of English

  • indent — indent1 [in dent′; ] for n. [ in′dent΄, in dent′] vt. [ME endenten < OFr endenter or ML indentare, both < L in, in + dens, TOOTH] 1. a) to cut toothlike points into (an edge or border); notch; also, to join by mating notches b) to make… …   English World dictionary

  • Indent — In*dent , n. 1. A cut or notch in the margin of anything, or a recess like a notch. Shak. [1913 Webster] 2. A stamp; an impression. [Obs.] [1913 Webster] 3. A certificate, or intended certificate, issued by the government of the United States at… …   The Collaborative International Dictionary of English

  • Indént — (engl., »Einschnitt, Kerbe«, Indentgeschäft), Bezeichnung für ein im Verkehr mit Ostasien und Australien übliches Handelsgeschäft, wobei eine europäische Handelsfirma oder die Zweigniederlassung einer solchen einem eingebornen Händler europäische …   Meyers Großes Konversations-Lexikon

  • Indent — (engl.), Indentgeschäft, Vertrag über Warenlieferung an europ. Handelshäuser in Ostindien, oder der letztern an einheimische Händler …   Kleines Konversations-Lexikon

  • indent — index bind (obligate), depress, requisition, undertake Burton s Legal Thesaurus. William C. Burton. 2006 …   Law dictionary

  • Indent —   [engl.], Absatzeinzug …   Universal-Lexikon

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”