Référence du fichier App.h

Ce graphe montre quels fichiers incluent directement ou indirectement ce fichier:

Aller au code source de ce fichier.

Fonctions

void App_ChargerConfig ()
void App_Lister_Tableau ()
gchar * getNomSansExtension (gchar *fich)
gshort getExtension (gchar *fich)
void Ajouter_ELEMENT (gchar *unNom, gchar *unChemin, gshort onglet)


Documentation des fonctions

void Ajouter_ELEMENT gchar *  unNom,
gchar *  unChemin,
gshort  onglet
 

Définition à la ligne 181 du fichier App.h.

Références NB.

Référencé par Fichier_Choisir(), Fichier_Nouveau(), Projet_Ouvrir(), et Show_Editor().

00182 {
00183   //g_print("Ajouter_ELEMENT()\n");
00184   nom       [NB] = g_strdup(unNom);
00185   chemin    [NB] = (unChemin) ? g_strdup(unChemin) : NULL;
00186   estModifie[NB] = FALSE;
00187   IDOnglet  [NB] = onglet;
00188   //g_print("Ajouter_ELEMENT(fin)\n");
00189 }

void App_ChargerConfig  ) 
 

Définition à la ligne 4 du fichier App.h.

Références AppBGROUND, AppConf, AppFONT, AppHEIGHT, AppLEFT, AppMAXIMIZED, AppTOP, AppUNDOLEVELS, AppWIDTH, et ShowRightMARGIN.

Référencé par Show_Editor().

00005 {
00006   FILE   *pF=NULL;
00007   gchar  c, mot[200], *tmp=NULL;
00008   guchar flag=0, b=0;
00009 
00010   //g_print("Chargement config : %s\n", chem);
00011   if ( !(pF = fopen (AppConf,"r")) )
00012   {
00013      //g_print("Impossible d'ouvrir %s\n", AppConf);
00014      return;
00015   }
00016   memset(mot,0,200);
00017 
00018   //g_print(" ouvre fichier\n");
00019   while ((c = fgetc (pF)) != EOF)
00020   {
00021    if (c == ':')
00022    {
00023      if      (g_strcasecmp(mot, "LEFT"           )==0) flag=1;
00024      else if (g_strcasecmp(mot, "TOP"            )==0) flag=2;
00025      else if (g_strcasecmp(mot, "HEIGHT"         )==0) flag=3;
00026      else if (g_strcasecmp(mot, "WIDTH"          )==0) flag=4;
00027      else if (g_strcasecmp(mot, "MAXIMIZED"      )==0) flag=5;
00028      else if (g_strcasecmp(mot, "BGROUND"        )==0) flag=6;
00029      else if (g_strcasecmp(mot, "FONT"           )==0) flag=7;
00030      else if (g_strcasecmp(mot, "SHOWRIGHTMARGIN")==0) flag=8;
00031      else if (g_strcasecmp(mot, "UNDOLEVELS"     )==0) flag=9;
00032      else flag=0;
00033      memset(mot,0,b);  b=0;
00034    }
00035    else if (c ==0XA)
00036    {
00037      if      (flag==1) // LEFT -------------------------------------------------
00038      {
00039         tmp = g_locale_to_utf8 (mot, -1, NULL, NULL, NULL);
00040         AppLEFT = g_ascii_strtod(tmp,NULL);
00041      }
00042      else if (flag==2) // TOP --------------------------------------------------
00043      {
00044         tmp = g_locale_to_utf8 (mot, -1, NULL, NULL, NULL);
00045         AppTOP = g_ascii_strtod(tmp,NULL);
00046      }
00047      else if (flag==3) // HEIGHT -----------------------------------------------
00048      {
00049         tmp = g_locale_to_utf8 (mot, -1, NULL, NULL, NULL);
00050         AppHEIGHT = g_ascii_strtod(tmp,NULL);
00051      }
00052      else if (flag==4) // WIDTH ------------------------------------------------
00053      {
00054         tmp = g_locale_to_utf8 (mot, -1, NULL, NULL, NULL);
00055         AppWIDTH = g_ascii_strtod(tmp,NULL);
00056      }
00057      else if (flag==5) // MAXIMIZED --------------------------------------------
00058      {
00059         tmp = g_locale_to_utf8 (mot, -1, NULL, NULL, NULL);
00060         AppMAXIMIZED = (g_ascii_strtod(tmp,NULL)) ? TRUE : FALSE;
00061      }
00062      else if (flag==6) // BACKGROUND COLOR -------------------------------------
00063         AppBGROUND = g_locale_to_utf8 (mot, -1, NULL, NULL, NULL);
00064      else if (flag==7) // FONT -------------------------------------------------
00065         AppFONT = g_locale_to_utf8 (mot, -1, NULL, NULL, NULL);
00066      else if (flag==8) // SHOWRIGHTMARGIN --------------------------------------
00067      {
00068         tmp = g_locale_to_utf8 (mot, -1, NULL, NULL, NULL);
00069         ShowRightMARGIN = (g_ascii_strtod(tmp,NULL)) ? TRUE : FALSE;
00070      }
00071      else if (flag==9) // UNDO LEVELS ------------------------------------------
00072      {
00073        tmp = g_locale_to_utf8 (mot, -1, NULL, NULL, NULL);
00074        AppUNDOLEVELS = (g_ascii_strtod(tmp,NULL))?TRUE:FALSE;
00075      }
00076      memset(mot,0,b);  b=flag=0;
00077    }
00078    else if (c !=0XD) mot[b++] = c;
00079   }
00080   fclose (pF);
00081   if (tmp) g_free(tmp);
00082   //g_print("Config chargée\n");
00083 }

void App_Lister_Tableau  ) 
 

Définition à la ligne 92 du fichier App.h.

Références idACTIF, idOngletACTIF, NB, et NBfichiersOuverts.

Référencé par Projet_Ouvrir().

00093 {
00094   guint i;
00095   if (!NB) return;
00096   g_print("\nNB=%d NBfichiersOuverts=%d "
00097           "idOngletACTIF=%d idACTIF=%d\n",NB,NBfichiersOuverts,idOngletACTIF,idACTIF);
00098 
00099   g_print("\tnom\tid\tExt\tModif\tOnglet\tchemin\n"
00100           "----------------------------------------------------------------\n");
00101   for (i=0; i<NB; i++)
00102     g_print("(%10s)\t%d\t%d\t%d\t%d\t(%s)\n",   nom[i],
00103                                                 i,
00104                                                 ext[i],
00105                                                 estModifie[i],
00106                                                 IDOnglet[i],
00107                                                 chemin[i]);
00108 }

gshort getExtension gchar *  fich  ) 
 

Définition à la ligne 138 du fichier App.h.

Références EXTs, et nbEXT.

Référencé par Ajouter_TreeviewItem(), et Fichier_EnregistrerSous().

00139 {
00140   gchar *exta =NULL;
00141   guint n,pos,len;
00142 
00143   // si c'est un dossier, retourne -1
00144   if (g_file_test(fich, G_FILE_TEST_IS_DIR)) return -1;
00145 
00146   n = pos = strlen(fich);
00147   //pos=n;
00148   while(pos>0) // cherche la position du dernier point
00149   {
00150    if (fich[pos]=='.') break;
00151    pos--;
00152   }
00153   
00154   if (!pos) //pas de point ex. README Makefile AUTHORS etc
00155   {
00156     if (g_strcasecmp(fich, "Makefile")==0) return -2;
00157     else return 0; 
00158   }
00159 
00160   len = n-pos; // il y a un point: sort l' extension ...
00161   exta=g_malloc(len);
00162   strncpy(exta, fich+pos+1, len-1);
00163   exta[len-1]='\0';
00164   len=0;
00165 
00166   for (n=1; n<nbEXT; n++) // ... Pour la comparer aux extensions internes
00167   {
00168     if (g_strcasecmp(exta, EXTs[n])==0)
00169     {
00170      len=n;
00171      break;
00172     }
00173   }
00174   g_free (exta);
00175   return len;
00176 }

gchar* getNomSansExtension gchar *  fich  ) 
 

Définition à la ligne 112 du fichier App.h.

Référencé par Projet_Compiler(), Projet_Generate_Makefile(), et Projet_Ouvrir().

00113 {
00114   gchar *nom =NULL;
00115   gushort n,pos;
00116   
00117   if (!fich) return NULL;
00118   n = strlen(fich);
00119   pos=n;
00120   while(pos>0) // cherche la position du dernier point
00121   {
00122    if (fich[pos]=='.') break;
00123    pos--;
00124   };
00125   
00126   if (pos) // il y a un point: sort l' extension ...
00127   {
00128     nom=g_malloc(pos);
00129     strncpy(nom, fich, pos);
00130     nom[pos]='\0';
00131   }
00132   return nom;
00133 }


Généré le Sat Jan 13 02:54:14 2007 pour EdBX:IDELangageC,Python,FASMécritavecGTK+ par  doxygen 1.4.2