00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include <stdio.h>
00042 #include <string.h>
00043 #include "mensagem.h"
00044 #include "memvirtu.h"
00045 #include "lowparam.h"
00046 #include "lowmacro.h"
00047 #include "lowsolid.h"
00048 #include "vectorop.h"
00049 #include "mancommd.h"
00050 #include "genfunc_.h"
00051 #include "hiegroup.h"
00052
00053 #ifdef __Extended_Version
00054 void MSD_execNameListGroupName(void)
00055 {
00056 char gname[30];
00057
00058 while (1 != sscanf(restbuf, "%s", gname))
00059 {
00060 printf("ListGroupName: name\n");
00061 if (!lineins("? "))
00062 {
00063 return;
00064 }
00065 }
00066 MSD_highNameListGroupName(gname);
00067 }
00068
00069 #endif
00070
00071 int MSD_highNameListGroupName(char *name)
00072 {
00073 GPTYPE gptr;
00074
00075 if ((gptr = MSD_lowFindGroupByName(name)) == GNIL)
00076 {
00077 fprintf(stderr, MEN_NaoEncontrouGroupNome, NAM_ListGroup, name);
00078 return(ERROR);
00079 }
00080 return(MSD_lowNameListGroupName(gptr));
00081 }
00082
00083 int MSD_lowNameListGroupName(GPTYPE gptr)
00084 {
00085 SPTYPE optr;
00086
00087 printf("GRUPO = %-20s", GrpName(gptr));
00088 if (GrpParent(gptr) != GNIL)
00089 {
00090 printf("Grupo Ancestral = %-20s\n", GrpName(GrpParent(gptr)));
00091 }
00092 else
00093 {
00094 printf("Nao possui grupo ancestral!\n");
00095 }
00096
00097 for (AllSolids(optr))
00098 {
00099 if (gptr == SolGroup(optr))
00100 {
00101 printf("%-20s", SolName(optr));
00102 }
00103 }
00104 printf("\n");
00105 return(SUCCESS);
00106 }
00107
00108 void MSD_lowListAllGroup(void)
00109 {
00110 GPTYPE gptr;
00111
00112 for (AllGroup(gptr))
00113 {
00114 MSD_lowListGroup(gptr);
00115 }
00116 }
00117
00118 void MSD_lowListGroup(GPTYPE gptr)
00119 {
00120 printf("Grupo Nome=%-18s Cor=%2d ", GrpName(gptr), GrpGColor(gptr));
00121 if (GrpParent(gptr) == GNIL)
00122 {
00123 printf("Grupo Ancestral = NULL\n");
00124 }
00125 else
00126 {
00127 printf("Grupo Ancestral = %-18s\n", GrpName(GrpParent(gptr)));
00128 }
00129 if (GrpGAxs(gptr) != ANIL)
00130 {
00131 printf(" axis = %-17s\n", AxsName(GrpGAxs(gptr)));
00132 }
00133 }
00134
00135 void MSD_lowListAllGroupName(void)
00136 {
00137 GPTYPE gptr;
00138
00139 for (AllGroup(gptr))
00140 {
00141 printf("%-20s", GrpName(gptr));
00142 }
00143 printf("\n");
00144 }