#include #include #include "projet.h" #include "projetx.m" /* Retourne le nom du programmeur associ‚ … un r‚vision. */ const char *intgdat_rev2prog(const char *revision) { REVISION rev(revision); return prog_num2str(rev.getprog()); } /* Dialogue pour int‚gration de plusieurs versions d'un r‚pertoire. Retourne != 0 si int‚gration a ‚t‚ faite, 0 si abandon. */ PUBLIC int INTEGRE_FILE::menudir () { DIALOG dia; char nomdir[MAXSIZ_NAME]; path_splitlex (fname,nomdir,NULL); for (int i=0; irevs.root),tra->revs.dir); } dia.setbutinfo (MENU_USR1,MSG_U(B_EFFACE,"Efface"),MSG_R(B_EFFACE)); dia.setbutinfo (MENU_USR2,MSG_U(B_GARDE,"Garde"),MSG_R(B_GARDE)); char titre[100]; snprintf (titre,sizeof(titre)-1,MSG_U(T_INTGDIR,"Répertoire %s") ,nomdir); int nof = 0; MENU_STATUS code = dia.edit (titre,"",help_nil,nof); int ret = 0; if (code == MENU_USR1){ // On d‚truit le sous-r‚pertoire sans question. dir_delete (nomdir,NULL); ret = 1; }else if (code == MENU_USR2){ // Le r‚pertoire est accept‚, on ne fait rien. L'usager devra // accept‚ chaque fichier du r‚pertoire. // Il y a un integre.dat qui a ‚t‚ cr‚‚ sp‚cifiquement pour ce // sous-r‚pertoire. ret = 1; } return ret; }