diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index 46cda735e72e02cdc48df107750d25e47f394e0b..e5df6a24eaa0192e108f960adefe340c3ce1c761 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -1,4 +1,4 @@ -// $Id: CommandLine.cpp,v 1.72 2006-08-05 10:05:44 geuzaine Exp $ +// $Id: CommandLine.cpp,v 1.73 2006-08-07 13:57:13 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -167,8 +167,8 @@ char *Get_BuildOptions(void) void Get_Options(int argc, char *argv[]) { // Parse session and option files - ParseFile(CTX.session_filename_fullpath, 1, 1); - ParseFile(CTX.options_filename_fullpath, 1, 1); + ParseFile(CTX.session_filename_fullpath, 1); + ParseFile(CTX.options_filename_fullpath, 1); // Get command line options int i = 1; @@ -257,7 +257,7 @@ void Get_Options(int argc, char *argv[]) else if(!strcmp(argv[i] + 1, "option")) { i++; if(argv[i] != NULL) - ParseFile(argv[i++], 1, 1); + ParseFile(argv[i++], 1); else { fprintf(stderr, ERROR_STR "Missing file name\n"); exit(1); diff --git a/Common/ViewsIO.cpp b/Common/ViewsIO.cpp index 0f68dc940f9e27a2ffbcd2f6a6df7e2b8f3c7b21..c7508d33f0c5162d012ada66c30371cd72103ef3 100644 --- a/Common/ViewsIO.cpp +++ b/Common/ViewsIO.cpp @@ -1,4 +1,4 @@ -// $Id: ViewsIO.cpp,v 1.4 2006-01-29 20:32:48 geuzaine Exp $ +// $Id: ViewsIO.cpp,v 1.5 2006-08-07 13:57:13 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -40,14 +40,10 @@ void ReadView(FILE *file, char *filename) double version; Post_View *v; - Msg(INFO, "Reading post-processing file '%s'", filename); - while(1) { do { - if(!fgets(str, 256, file)) - break; - if(feof(file)) + if(!fgets(str, 256, file) || feof(file)) break; } while(str[0] != '$'); @@ -306,9 +302,7 @@ void ReadView(FILE *file, char *filename) } do { - if(!fgets(str, 256, file)) - Msg(GERROR, "Prematured end of file"); - if(feof(file)) + if(!fgets(str, 256, file) || feof(file)) Msg(GERROR, "Prematured end of file"); } while(str[0] != '$'); @@ -317,9 +311,6 @@ void ReadView(FILE *file, char *filename) #if defined(HAVE_FLTK) UpdateViewsInGUI(); #endif - - Msg(INFO, "Read post-processing file '%s'", filename); - Msg(STATUS2N, "Read '%s'", filename); } // Write view to file in Parsed, ASCII or Binary format @@ -819,7 +810,7 @@ void WriteView(Post_View *v, char *filename, int format, int append) return; } if(!append) - Msg(INFO, "Writing post-processing file '%s'", filename); + Msg(STATUS2, "Writing '%s'", filename); } else file = stdout; @@ -835,8 +826,7 @@ void WriteView(Post_View *v, char *filename, int format, int append) if(filename) { fclose(file); - Msg(INFO, "Wrote view '%s' in file '%s'", v->Name, filename); - Msg(STATUS2N, "Wrote '%s'", filename); + Msg(STATUS2, "Wrote '%s'", filename); } } diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index 0362a7835749ae48a8d9dc60e56ebda64781f9aa..71fe96964c4df986d00d99a212734cd425127411 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.423 2006-08-07 00:08:07 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.424 2006-08-07 13:57:13 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -891,8 +891,9 @@ void options_browser_cb(CALLBACK_ARGS) void options_save_cb(CALLBACK_ARGS) { + Msg(STATUS2, "Writing '%s'", CTX.options_filename_fullpath); Print_Options(0, GMSH_OPTIONSRC, 1, 1, CTX.options_filename_fullpath); - Msg(STATUS2N, "Wrote '%s'", CTX.options_filename_fullpath); + Msg(STATUS2, "Wrote '%s'", CTX.options_filename_fullpath); } void options_restore_defaults_cb(CALLBACK_ARGS) diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index b0931728679b29e36e88b9d50808f7bccaef7118..493da97117a9289a04756666a35cd7070bc39c10 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.504 2006-08-06 22:58:48 geuzaine Exp $ +// $Id: GUI.cpp,v 1.505 2006-08-07 13:57:13 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -3772,7 +3772,7 @@ void GUI::save_message(char *filename) return; } - Msg(INFO, "Writing log file '%s'", filename); + Msg(STATUS2, "Writing '%s'", filename); for(int i = 1; i <= msg_browser->size(); i++) { const char *c = msg_browser->text(i); if(c[0] == '@') @@ -3780,9 +3780,7 @@ void GUI::save_message(char *filename) else fprintf(fp, "%s\n", c); } - - Msg(INFO, "Wrote log file '%s'", filename); - Msg(STATUS2N, "Wrote '%s'", filename); + Msg(STATUS2, "Wrote '%s'", filename); fclose(fp); } diff --git a/Fltk/Main.cpp b/Fltk/Main.cpp index 1022dbeb64addbed902dfac7b4c6187f025be26d..6f77e7283598fa9c0215997a420860bdda0526d5 100644 --- a/Fltk/Main.cpp +++ b/Fltk/Main.cpp @@ -1,4 +1,4 @@ -// $Id: Main.cpp,v 1.93 2006-08-06 22:58:49 geuzaine Exp $ +// $Id: Main.cpp,v 1.94 2006-08-07 13:57:14 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -167,6 +167,7 @@ int main(int argc, char *argv[]) // Say welcome! + Msg(STATUS1N, "Geometry"); Msg(STATUS2N, "Gmsh %s", Get_GmshVersion()); // Log the following for bug reports diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp index dca8bb17c51ecb9ad619de5c085a45aa1ca60fd8..2e2625d02275166838fa127a0968e10ea6b6cb87 100644 --- a/Geo/MElement.cpp +++ b/Geo/MElement.cpp @@ -95,7 +95,7 @@ void MElement::writeMSH(FILE *fp, double version, int num, int elementary, fprintf(fp, " %d", getVertex(n - i - 1)->getNum()); } - fprintf(fp, " \n"); + fprintf(fp, "\n"); } void MElement::writePOS(FILE *fp, double scalingFactor) diff --git a/Graphics/CreateFile.cpp b/Graphics/CreateFile.cpp index b541d302c3dbbd9404c8e4c25ca682c2d8e1eb5e..f60bdc49c3e6b3ad4e4c66ad3aebc2c742af5016 100644 --- a/Graphics/CreateFile.cpp +++ b/Graphics/CreateFile.cpp @@ -1,4 +1,4 @@ -// $Id: CreateFile.cpp,v 1.87 2006-08-07 00:08:08 geuzaine Exp $ +// $Id: CreateFile.cpp,v 1.88 2006-08-07 13:57:14 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -107,7 +107,7 @@ void CreateOutputFile(char *filename, int format) GLint height = viewport[3] - viewport[1]; bool printEndMessage = true; - if(format != FORMAT_AUTO) Msg(INFO, "Writing '%s'", name); + if(format != FORMAT_AUTO) Msg(STATUS2, "Writing '%s'", name); switch (format) { diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 1b3b47f424a3dfb64b1a3ec1c246d0f0998b51b0..8826bed89888690212434ad50948d877c2697aac 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -126,7 +126,7 @@ #line 1 "Gmsh.y" -// $Id: Gmsh.tab.cpp,v 1.269 2006-07-14 13:31:08 geuzaine Exp $ +// $Id: Gmsh.tab.cpp,v 1.270 2006-08-07 13:57:14 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -523,27 +523,27 @@ static const short yyrline[] = { 0, 1477, 1493, 1513, 1530, 1547, 1567, 1573, 1578, 1583, 1590, 1592, 1593, 1596, 1601, 1605, 1621, 1637, 1653, 1673, 1688, 1694, 1700, 1711, 1721, 1731, 1745, 1763, 1777, 1786, 1792, - 1803, 1816, 1859, 1874, 1885, 1904, 1914, 1936, 1940, 1945, - 1950, 1960, 1977, 1993, 2019, 2046, 2078, 2085, 2090, 2096, - 2100, 2108, 2117, 2125, 2133, 2138, 2146, 2151, 2159, 2164, - 2174, 2181, 2188, 2195, 2202, 2209, 2216, 2223, 2230, 2237, - 2242, 2249, 2254, 2261, 2266, 2273, 2278, 2285, 2290, 2297, - 2302, 2309, 2314, 2321, 2326, 2333, 2338, 2348, 2352, 2357, - 2384, 2408, 2416, 2435, 2453, 2471, 2500, 2535, 2562, 2589, - 2603, 2621, 2626, 2635, 2637, 2638, 2639, 2640, 2641, 2642, - 2643, 2644, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, - 2659, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, - 2669, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, - 2679, 2680, 2681, 2682, 2684, 2685, 2686, 2687, 2688, 2689, - 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, - 2700, 2701, 2702, 2703, 2704, 2709, 2714, 2715, 2716, 2717, - 2718, 2719, 2723, 2739, 2754, 2774, 2788, 2801, 2824, 2842, - 2860, 2878, 2896, 2903, 2908, 2912, 2916, 2920, 2926, 2931, - 2935, 2939, 2945, 2949, 2953, 2959, 2965, 2972, 2978, 2982, - 2987, 2991, 3002, 3009, 3020, 3040, 3050, 3060, 3070, 3087, - 3106, 3130, 3158, 3164, 3168, 3172, 3184, 3189, 3201, 3208, - 3229, 3234, 3248, 3254, 3260, 3265, 3273, 3281, 3295, 3309, - 3313, 3332, 3354 + 1803, 1816, 1861, 1876, 1887, 1906, 1916, 1938, 1942, 1947, + 1952, 1962, 1979, 1995, 2021, 2048, 2080, 2087, 2092, 2098, + 2102, 2110, 2119, 2127, 2135, 2140, 2148, 2153, 2161, 2166, + 2176, 2183, 2190, 2197, 2204, 2211, 2218, 2225, 2232, 2239, + 2244, 2251, 2256, 2263, 2268, 2275, 2280, 2287, 2292, 2299, + 2304, 2311, 2316, 2323, 2328, 2335, 2340, 2350, 2354, 2359, + 2386, 2410, 2418, 2437, 2455, 2473, 2502, 2537, 2564, 2591, + 2605, 2623, 2628, 2637, 2639, 2640, 2641, 2642, 2643, 2644, + 2645, 2646, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 2660, + 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 2670, + 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 2680, + 2681, 2682, 2683, 2684, 2686, 2687, 2688, 2689, 2690, 2691, + 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 2700, 2701, + 2702, 2703, 2704, 2705, 2706, 2711, 2716, 2717, 2718, 2719, + 2720, 2721, 2725, 2741, 2756, 2776, 2790, 2803, 2826, 2844, + 2862, 2880, 2898, 2905, 2910, 2914, 2918, 2922, 2928, 2933, + 2937, 2941, 2947, 2951, 2955, 2961, 2967, 2974, 2980, 2984, + 2989, 2993, 3004, 3011, 3022, 3042, 3052, 3062, 3072, 3089, + 3108, 3132, 3160, 3166, 3170, 3174, 3186, 3191, 3203, 3210, + 3231, 3236, 3250, 3256, 3262, 3267, 3275, 3283, 3297, 3311, + 3315, 3334, 3356 }; #endif @@ -4509,7 +4509,9 @@ case 132: // open simultaneously. The right solution would be of course // to modify FunctionManager to reopen the files instead of // using the FILE pointer, but hey, I'm lazy... - ParseFile(tmpstring, 0, 0, 1); + Msg(STATUS2, "Reading '%s'", tmpstring); + ParseFile(tmpstring, 0, 1); + Msg(STATUS2, "Read '%s'", tmpstring); } else if(!strcmp(yyvsp[-2].c, "Print")){ #if defined(HAVE_FLTK) @@ -4541,7 +4543,7 @@ case 132: ; break;} case 133: -#line 1860 "Gmsh.y" +#line 1862 "Gmsh.y" { if(!strcmp(yyvsp[-6].c, "Save") && !strcmp(yyvsp[-5].c, "View")){ Post_View **vv = (Post_View **)List_Pointer_Test(CTX.post.list, (int)yyvsp[-3].d); @@ -4558,7 +4560,7 @@ case 133: ; break;} case 134: -#line 1875 "Gmsh.y" +#line 1877 "Gmsh.y" { if(!strcmp(yyvsp[-6].c, "Background") && !strcmp(yyvsp[-5].c, "Mesh") && !strcmp(yyvsp[-4].c, "View")){ Post_View **vv = (Post_View **)List_Pointer_Test(CTX.post.list, (int)yyvsp[-2].d); @@ -4571,7 +4573,7 @@ case 134: ; break;} case 135: -#line 1886 "Gmsh.y" +#line 1888 "Gmsh.y" { if(!strcmp(yyvsp[-2].c, "Sleep")){ SleepInSeconds(yyvsp[-1].d); @@ -4592,7 +4594,7 @@ case 135: ; break;} case 136: -#line 1905 "Gmsh.y" +#line 1907 "Gmsh.y" { try { GMSH_PluginManager::instance()->action(yyvsp[-4].c, yyvsp[-1].c, 0); @@ -4604,7 +4606,7 @@ case 136: ; break;} case 137: -#line 1915 "Gmsh.y" +#line 1917 "Gmsh.y" { if(!strcmp(yyvsp[-1].c, "ElementsFromAllViews")) CombineViews(0, 1, CTX.post.combine_remove_orig); @@ -4628,27 +4630,27 @@ case 137: ; break;} case 138: -#line 1937 "Gmsh.y" +#line 1939 "Gmsh.y" { exit(0); ; break;} case 139: -#line 1941 "Gmsh.y" +#line 1943 "Gmsh.y" { CTX.forced_bbox = 0; SetBoundingBox(); ; break;} case 140: -#line 1946 "Gmsh.y" +#line 1948 "Gmsh.y" { CTX.forced_bbox = 1; SetBoundingBox(yyvsp[-12].d, yyvsp[-10].d, yyvsp[-8].d, yyvsp[-6].d, yyvsp[-4].d, yyvsp[-2].d); ; break;} case 141: -#line 1951 "Gmsh.y" +#line 1953 "Gmsh.y" { #if defined(HAVE_FLTK) Draw(); @@ -4656,7 +4658,7 @@ case 141: ; break;} case 142: -#line 1963 "Gmsh.y" +#line 1965 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = yyvsp[-3].d; LoopControlVariablesTab[ImbricatedLoop][1] = yyvsp[-1].d; @@ -4673,7 +4675,7 @@ case 142: ; break;} case 143: -#line 1978 "Gmsh.y" +#line 1980 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = yyvsp[-5].d; LoopControlVariablesTab[ImbricatedLoop][1] = yyvsp[-3].d; @@ -4691,7 +4693,7 @@ case 143: ; break;} case 144: -#line 1994 "Gmsh.y" +#line 1996 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = yyvsp[-3].d; LoopControlVariablesTab[ImbricatedLoop][1] = yyvsp[-1].d; @@ -4719,7 +4721,7 @@ case 144: ; break;} case 145: -#line 2020 "Gmsh.y" +#line 2022 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = yyvsp[-5].d; LoopControlVariablesTab[ImbricatedLoop][1] = yyvsp[-3].d; @@ -4748,7 +4750,7 @@ case 145: ; break;} case 146: -#line 2047 "Gmsh.y" +#line 2049 "Gmsh.y" { if(ImbricatedLoop <= 0){ yymsg(GERROR, "Invalid For/EndFor loop"); @@ -4782,7 +4784,7 @@ case 146: ; break;} case 147: -#line 2079 "Gmsh.y" +#line 2081 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction(yyvsp[0].c, yyin, yyname, yylineno)) yymsg(GERROR, "Redefinition of function %s", yyvsp[0].c); @@ -4791,14 +4793,14 @@ case 147: ; break;} case 148: -#line 2086 "Gmsh.y" +#line 2088 "Gmsh.y" { if(!FunctionManager::Instance()->leaveFunction(&yyin, yyname, yylineno)) yymsg(GERROR, "Error while exiting function"); ; break;} case 149: -#line 2091 "Gmsh.y" +#line 2093 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction(yyvsp[-1].c, &yyin, yyname, yylineno)) yymsg(GERROR, "Unknown function %s", yyvsp[-1].c); @@ -4806,18 +4808,18 @@ case 149: ; break;} case 150: -#line 2097 "Gmsh.y" +#line 2099 "Gmsh.y" { if(!yyvsp[-1].d) skip_until("If", "EndIf"); ; break;} case 151: -#line 2101 "Gmsh.y" +#line 2103 "Gmsh.y" { ; break;} case 152: -#line 2110 "Gmsh.y" +#line 2112 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, yyvsp[-1].l, @@ -4827,7 +4829,7 @@ case 152: ; break;} case 153: -#line 2118 "Gmsh.y" +#line 2120 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, yyvsp[-1].l, @@ -4837,7 +4839,7 @@ case 153: ; break;} case 154: -#line 2126 "Gmsh.y" +#line 2128 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, yyvsp[-1].l, @@ -4847,14 +4849,14 @@ case 154: ; break;} case 155: -#line 2134 "Gmsh.y" +#line 2136 "Gmsh.y" { extr.mesh.ExtrudeMesh = false; extr.mesh.Recombine = false; ; break;} case 156: -#line 2139 "Gmsh.y" +#line 2141 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, yyvsp[-3].l, @@ -4864,14 +4866,14 @@ case 156: ; break;} case 157: -#line 2147 "Gmsh.y" +#line 2149 "Gmsh.y" { extr.mesh.ExtrudeMesh = false; extr.mesh.Recombine = false; ; break;} case 158: -#line 2152 "Gmsh.y" +#line 2154 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, yyvsp[-3].l, @@ -4881,14 +4883,14 @@ case 158: ; break;} case 159: -#line 2160 "Gmsh.y" +#line 2162 "Gmsh.y" { extr.mesh.ExtrudeMesh = false; extr.mesh.Recombine = false; ; break;} case 160: -#line 2165 "Gmsh.y" +#line 2167 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, yyvsp[-3].l, @@ -4898,7 +4900,7 @@ case 160: ; break;} case 161: -#line 2175 "Gmsh.y" +#line 2177 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)yyvsp[-4].d, @@ -4907,7 +4909,7 @@ case 161: ; break;} case 162: -#line 2182 "Gmsh.y" +#line 2184 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)yyvsp[-4].d, @@ -4916,7 +4918,7 @@ case 162: ; break;} case 163: -#line 2189 "Gmsh.y" +#line 2191 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)yyvsp[-4].d, @@ -4925,7 +4927,7 @@ case 163: ; break;} case 164: -#line 2196 "Gmsh.y" +#line 2198 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)yyvsp[-8].d, @@ -4934,7 +4936,7 @@ case 164: ; break;} case 165: -#line 2203 "Gmsh.y" +#line 2205 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)yyvsp[-8].d, @@ -4943,7 +4945,7 @@ case 165: ; break;} case 166: -#line 2210 "Gmsh.y" +#line 2212 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)yyvsp[-8].d, @@ -4952,7 +4954,7 @@ case 166: ; break;} case 167: -#line 2217 "Gmsh.y" +#line 2219 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)yyvsp[-10].d, @@ -4961,7 +4963,7 @@ case 167: ; break;} case 168: -#line 2224 "Gmsh.y" +#line 2226 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)yyvsp[-10].d, @@ -4970,7 +4972,7 @@ case 168: ; break;} case 169: -#line 2231 "Gmsh.y" +#line 2233 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)yyvsp[-10].d, @@ -4979,14 +4981,14 @@ case 169: ; break;} case 170: -#line 2238 "Gmsh.y" +#line 2240 "Gmsh.y" { extr.mesh.ExtrudeMesh = false; extr.mesh.Recombine = false; ; break;} case 171: -#line 2243 "Gmsh.y" +#line 2245 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)yyvsp[-8].d, @@ -4995,14 +4997,14 @@ case 171: ; break;} case 172: -#line 2250 "Gmsh.y" +#line 2252 "Gmsh.y" { extr.mesh.ExtrudeMesh = false; extr.mesh.Recombine = false; ; break;} case 173: -#line 2255 "Gmsh.y" +#line 2257 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)yyvsp[-8].d, @@ -5011,14 +5013,14 @@ case 173: ; break;} case 174: -#line 2262 "Gmsh.y" +#line 2264 "Gmsh.y" { extr.mesh.ExtrudeMesh = false; extr.mesh.Recombine = false; ; break;} case 175: -#line 2267 "Gmsh.y" +#line 2269 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)yyvsp[-8].d, @@ -5027,14 +5029,14 @@ case 175: ; break;} case 176: -#line 2274 "Gmsh.y" +#line 2276 "Gmsh.y" { extr.mesh.ExtrudeMesh = false; extr.mesh.Recombine = false; ; break;} case 177: -#line 2279 "Gmsh.y" +#line 2281 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)yyvsp[-12].d, @@ -5043,14 +5045,14 @@ case 177: ; break;} case 178: -#line 2286 "Gmsh.y" +#line 2288 "Gmsh.y" { extr.mesh.ExtrudeMesh = false; extr.mesh.Recombine = false; ; break;} case 179: -#line 2291 "Gmsh.y" +#line 2293 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)yyvsp[-12].d, @@ -5059,14 +5061,14 @@ case 179: ; break;} case 180: -#line 2298 "Gmsh.y" +#line 2300 "Gmsh.y" { extr.mesh.ExtrudeMesh = false; extr.mesh.Recombine = false; ; break;} case 181: -#line 2303 "Gmsh.y" +#line 2305 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)yyvsp[-12].d, @@ -5075,14 +5077,14 @@ case 181: ; break;} case 182: -#line 2310 "Gmsh.y" +#line 2312 "Gmsh.y" { extr.mesh.ExtrudeMesh = false; extr.mesh.Recombine = false; ; break;} case 183: -#line 2315 "Gmsh.y" +#line 2317 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)yyvsp[-14].d, @@ -5091,14 +5093,14 @@ case 183: ; break;} case 184: -#line 2322 "Gmsh.y" +#line 2324 "Gmsh.y" { extr.mesh.ExtrudeMesh = false; extr.mesh.Recombine = false; ; break;} case 185: -#line 2327 "Gmsh.y" +#line 2329 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)yyvsp[-14].d, @@ -5107,14 +5109,14 @@ case 185: ; break;} case 186: -#line 2334 "Gmsh.y" +#line 2336 "Gmsh.y" { extr.mesh.ExtrudeMesh = false; extr.mesh.Recombine = false; ; break;} case 187: -#line 2339 "Gmsh.y" +#line 2341 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)yyvsp[-14].d, @@ -5123,17 +5125,17 @@ case 187: ; break;} case 188: -#line 2350 "Gmsh.y" +#line 2352 "Gmsh.y" { ; break;} case 189: -#line 2353 "Gmsh.y" +#line 2355 "Gmsh.y" { ; break;} case 190: -#line 2359 "Gmsh.y" +#line 2361 "Gmsh.y" { double d; extr.mesh.ExtrudeMesh = true; @@ -5161,7 +5163,7 @@ case 190: ; break;} case 191: -#line 2385 "Gmsh.y" +#line 2387 "Gmsh.y" { double d; extr.mesh.ExtrudeMesh = true; @@ -5187,13 +5189,13 @@ case 191: ; break;} case 192: -#line 2409 "Gmsh.y" +#line 2411 "Gmsh.y" { extr.mesh.Recombine = true; ; break;} case 193: -#line 2418 "Gmsh.y" +#line 2420 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-3].l); i++){ double d; @@ -5213,7 +5215,7 @@ case 193: ; break;} case 194: -#line 2436 "Gmsh.y" +#line 2438 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-6].l); i++){ double d; @@ -5233,7 +5235,7 @@ case 194: ; break;} case 195: -#line 2454 "Gmsh.y" +#line 2456 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-6].l); i++){ double d; @@ -5253,7 +5255,7 @@ case 195: ; break;} case 196: -#line 2472 "Gmsh.y" +#line 2474 "Gmsh.y" { Surface *s = FindSurface((int)yyvsp[-4].d, THEM); if(!s) @@ -5284,7 +5286,7 @@ case 196: ; break;} case 197: -#line 2501 "Gmsh.y" +#line 2503 "Gmsh.y" { Surface *s = FindSurface((int)yyvsp[-5].d, THEM); if(!s) @@ -5321,7 +5323,7 @@ case 197: ; break;} case 198: -#line 2536 "Gmsh.y" +#line 2538 "Gmsh.y" { Surface *s = FindSurface((int)yyvsp[-4].d, THEM); if(!s) @@ -5350,7 +5352,7 @@ case 198: ; break;} case 199: -#line 2563 "Gmsh.y" +#line 2565 "Gmsh.y" { Volume *v = FindVolume((int)yyvsp[-4].d, THEM); if(!v) @@ -5379,7 +5381,7 @@ case 199: ; break;} case 200: -#line 2590 "Gmsh.y" +#line 2592 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-3].l); i++){ double d; @@ -5395,7 +5397,7 @@ case 200: ; break;} case 201: -#line 2604 "Gmsh.y" +#line 2606 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){ double d; @@ -5410,51 +5412,51 @@ case 201: ; break;} case 202: -#line 2623 "Gmsh.y" +#line 2625 "Gmsh.y" { ReplaceAllDuplicates(THEM); ; break;} case 203: -#line 2627 "Gmsh.y" +#line 2629 "Gmsh.y" { IntersectAllSegmentsTogether(); ; break;} case 204: -#line 2636 "Gmsh.y" +#line 2638 "Gmsh.y" { yyval.d = yyvsp[0].d; ; break;} case 205: -#line 2637 "Gmsh.y" +#line 2639 "Gmsh.y" { yyval.d = yyvsp[-1].d; ; break;} case 206: -#line 2638 "Gmsh.y" +#line 2640 "Gmsh.y" { yyval.d = -yyvsp[0].d; ; break;} case 207: -#line 2639 "Gmsh.y" +#line 2641 "Gmsh.y" { yyval.d = yyvsp[0].d; ; break;} case 208: -#line 2640 "Gmsh.y" +#line 2642 "Gmsh.y" { yyval.d = !yyvsp[0].d; ; break;} case 209: -#line 2641 "Gmsh.y" +#line 2643 "Gmsh.y" { yyval.d = yyvsp[-2].d - yyvsp[0].d; ; break;} case 210: -#line 2642 "Gmsh.y" +#line 2644 "Gmsh.y" { yyval.d = yyvsp[-2].d + yyvsp[0].d; ; break;} case 211: -#line 2643 "Gmsh.y" +#line 2645 "Gmsh.y" { yyval.d = yyvsp[-2].d * yyvsp[0].d; ; break;} case 212: -#line 2645 "Gmsh.y" +#line 2647 "Gmsh.y" { if(!yyvsp[0].d) yymsg(GERROR, "Division by zero in '%g / %g'", yyvsp[-2].d, yyvsp[0].d); @@ -5463,247 +5465,247 @@ case 212: ; break;} case 213: -#line 2651 "Gmsh.y" +#line 2653 "Gmsh.y" { yyval.d = (int)yyvsp[-2].d % (int)yyvsp[0].d; ; break;} case 214: -#line 2652 "Gmsh.y" +#line 2654 "Gmsh.y" { yyval.d = pow(yyvsp[-2].d, yyvsp[0].d); ; break;} case 215: -#line 2653 "Gmsh.y" +#line 2655 "Gmsh.y" { yyval.d = yyvsp[-2].d < yyvsp[0].d; ; break;} case 216: -#line 2654 "Gmsh.y" +#line 2656 "Gmsh.y" { yyval.d = yyvsp[-2].d > yyvsp[0].d; ; break;} case 217: -#line 2655 "Gmsh.y" +#line 2657 "Gmsh.y" { yyval.d = yyvsp[-2].d <= yyvsp[0].d; ; break;} case 218: -#line 2656 "Gmsh.y" +#line 2658 "Gmsh.y" { yyval.d = yyvsp[-2].d >= yyvsp[0].d; ; break;} case 219: -#line 2657 "Gmsh.y" +#line 2659 "Gmsh.y" { yyval.d = yyvsp[-2].d == yyvsp[0].d; ; break;} case 220: -#line 2658 "Gmsh.y" +#line 2660 "Gmsh.y" { yyval.d = yyvsp[-2].d != yyvsp[0].d; ; break;} case 221: -#line 2659 "Gmsh.y" +#line 2661 "Gmsh.y" { yyval.d = yyvsp[-2].d && yyvsp[0].d; ; break;} case 222: -#line 2660 "Gmsh.y" +#line 2662 "Gmsh.y" { yyval.d = yyvsp[-2].d || yyvsp[0].d; ; break;} case 223: -#line 2661 "Gmsh.y" +#line 2663 "Gmsh.y" { yyval.d = yyvsp[-4].d? yyvsp[-2].d : yyvsp[0].d; ; break;} case 224: -#line 2662 "Gmsh.y" +#line 2664 "Gmsh.y" { yyval.d = exp(yyvsp[-1].d); ; break;} case 225: -#line 2663 "Gmsh.y" +#line 2665 "Gmsh.y" { yyval.d = log(yyvsp[-1].d); ; break;} case 226: -#line 2664 "Gmsh.y" +#line 2666 "Gmsh.y" { yyval.d = log10(yyvsp[-1].d); ; break;} case 227: -#line 2665 "Gmsh.y" +#line 2667 "Gmsh.y" { yyval.d = sqrt(yyvsp[-1].d); ; break;} case 228: -#line 2666 "Gmsh.y" +#line 2668 "Gmsh.y" { yyval.d = sin(yyvsp[-1].d); ; break;} case 229: -#line 2667 "Gmsh.y" +#line 2669 "Gmsh.y" { yyval.d = asin(yyvsp[-1].d); ; break;} case 230: -#line 2668 "Gmsh.y" +#line 2670 "Gmsh.y" { yyval.d = cos(yyvsp[-1].d); ; break;} case 231: -#line 2669 "Gmsh.y" +#line 2671 "Gmsh.y" { yyval.d = acos(yyvsp[-1].d); ; break;} case 232: -#line 2670 "Gmsh.y" +#line 2672 "Gmsh.y" { yyval.d = tan(yyvsp[-1].d); ; break;} case 233: -#line 2671 "Gmsh.y" +#line 2673 "Gmsh.y" { yyval.d = atan(yyvsp[-1].d); ; break;} case 234: -#line 2672 "Gmsh.y" +#line 2674 "Gmsh.y" { yyval.d = atan2(yyvsp[-3].d, yyvsp[-1].d);; break;} case 235: -#line 2673 "Gmsh.y" +#line 2675 "Gmsh.y" { yyval.d = sinh(yyvsp[-1].d); ; break;} case 236: -#line 2674 "Gmsh.y" +#line 2676 "Gmsh.y" { yyval.d = cosh(yyvsp[-1].d); ; break;} case 237: -#line 2675 "Gmsh.y" +#line 2677 "Gmsh.y" { yyval.d = tanh(yyvsp[-1].d); ; break;} case 238: -#line 2676 "Gmsh.y" +#line 2678 "Gmsh.y" { yyval.d = fabs(yyvsp[-1].d); ; break;} case 239: -#line 2677 "Gmsh.y" +#line 2679 "Gmsh.y" { yyval.d = floor(yyvsp[-1].d); ; break;} case 240: -#line 2678 "Gmsh.y" +#line 2680 "Gmsh.y" { yyval.d = ceil(yyvsp[-1].d); ; break;} case 241: -#line 2679 "Gmsh.y" +#line 2681 "Gmsh.y" { yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ; break;} case 242: -#line 2680 "Gmsh.y" +#line 2682 "Gmsh.y" { yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ; break;} case 243: -#line 2681 "Gmsh.y" +#line 2683 "Gmsh.y" { yyval.d = sqrt(yyvsp[-3].d*yyvsp[-3].d+yyvsp[-1].d*yyvsp[-1].d); ; break;} case 244: -#line 2682 "Gmsh.y" +#line 2684 "Gmsh.y" { yyval.d = yyvsp[-1].d*(double)rand()/(double)RAND_MAX; ; break;} case 245: -#line 2684 "Gmsh.y" +#line 2686 "Gmsh.y" { yyval.d = exp(yyvsp[-1].d); ; break;} case 246: -#line 2685 "Gmsh.y" +#line 2687 "Gmsh.y" { yyval.d = log(yyvsp[-1].d); ; break;} case 247: -#line 2686 "Gmsh.y" +#line 2688 "Gmsh.y" { yyval.d = log10(yyvsp[-1].d); ; break;} case 248: -#line 2687 "Gmsh.y" +#line 2689 "Gmsh.y" { yyval.d = sqrt(yyvsp[-1].d); ; break;} case 249: -#line 2688 "Gmsh.y" +#line 2690 "Gmsh.y" { yyval.d = sin(yyvsp[-1].d); ; break;} case 250: -#line 2689 "Gmsh.y" +#line 2691 "Gmsh.y" { yyval.d = asin(yyvsp[-1].d); ; break;} case 251: -#line 2690 "Gmsh.y" +#line 2692 "Gmsh.y" { yyval.d = cos(yyvsp[-1].d); ; break;} case 252: -#line 2691 "Gmsh.y" +#line 2693 "Gmsh.y" { yyval.d = acos(yyvsp[-1].d); ; break;} case 253: -#line 2692 "Gmsh.y" +#line 2694 "Gmsh.y" { yyval.d = tan(yyvsp[-1].d); ; break;} case 254: -#line 2693 "Gmsh.y" +#line 2695 "Gmsh.y" { yyval.d = atan(yyvsp[-1].d); ; break;} case 255: -#line 2694 "Gmsh.y" +#line 2696 "Gmsh.y" { yyval.d = atan2(yyvsp[-3].d, yyvsp[-1].d);; break;} case 256: -#line 2695 "Gmsh.y" +#line 2697 "Gmsh.y" { yyval.d = sinh(yyvsp[-1].d); ; break;} case 257: -#line 2696 "Gmsh.y" +#line 2698 "Gmsh.y" { yyval.d = cosh(yyvsp[-1].d); ; break;} case 258: -#line 2697 "Gmsh.y" +#line 2699 "Gmsh.y" { yyval.d = tanh(yyvsp[-1].d); ; break;} case 259: -#line 2698 "Gmsh.y" +#line 2700 "Gmsh.y" { yyval.d = fabs(yyvsp[-1].d); ; break;} case 260: -#line 2699 "Gmsh.y" +#line 2701 "Gmsh.y" { yyval.d = floor(yyvsp[-1].d); ; break;} case 261: -#line 2700 "Gmsh.y" +#line 2702 "Gmsh.y" { yyval.d = ceil(yyvsp[-1].d); ; break;} case 262: -#line 2701 "Gmsh.y" +#line 2703 "Gmsh.y" { yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ; break;} case 263: -#line 2702 "Gmsh.y" +#line 2704 "Gmsh.y" { yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ; break;} case 264: -#line 2703 "Gmsh.y" +#line 2705 "Gmsh.y" { yyval.d = sqrt(yyvsp[-3].d*yyvsp[-3].d+yyvsp[-1].d*yyvsp[-1].d); ; break;} case 265: -#line 2704 "Gmsh.y" +#line 2706 "Gmsh.y" { yyval.d = yyvsp[-1].d*(double)rand()/(double)RAND_MAX; ; break;} case 266: -#line 2713 "Gmsh.y" +#line 2715 "Gmsh.y" { yyval.d = yyvsp[0].d; ; break;} case 267: -#line 2714 "Gmsh.y" +#line 2716 "Gmsh.y" { yyval.d = 3.141592653589793; ; break;} case 268: -#line 2715 "Gmsh.y" +#line 2717 "Gmsh.y" { yyval.d = ParUtil::Instance()->rank(); ; break;} case 269: -#line 2716 "Gmsh.y" +#line 2718 "Gmsh.y" { yyval.d = ParUtil::Instance()->size(); ; break;} case 270: -#line 2717 "Gmsh.y" +#line 2719 "Gmsh.y" { yyval.d = Get_GmshMajorVersion(); ; break;} case 271: -#line 2718 "Gmsh.y" +#line 2720 "Gmsh.y" { yyval.d = Get_GmshMinorVersion(); ; break;} case 272: -#line 2719 "Gmsh.y" +#line 2721 "Gmsh.y" { yyval.d = Get_GmshPatchVersion(); ; break;} case 273: -#line 2724 "Gmsh.y" +#line 2726 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[0].c; @@ -5718,7 +5720,7 @@ case 273: ; break;} case 274: -#line 2740 "Gmsh.y" +#line 2742 "Gmsh.y" { char tmpstring[1024]; sprintf(tmpstring, "%s_%d", yyvsp[-4].c, (int)yyvsp[-1].d) ; @@ -5735,7 +5737,7 @@ case 274: ; break;} case 275: -#line 2755 "Gmsh.y" +#line 2757 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[-3].c; @@ -5757,7 +5759,7 @@ case 275: ; break;} case 276: -#line 2775 "Gmsh.y" +#line 2777 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[-2].c; @@ -5773,7 +5775,7 @@ case 276: ; break;} case 277: -#line 2789 "Gmsh.y" +#line 2791 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[-1].c; @@ -5788,7 +5790,7 @@ case 277: ; break;} case 278: -#line 2802 "Gmsh.y" +#line 2804 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[-4].c; @@ -5810,7 +5812,7 @@ case 278: ; break;} case 279: -#line 2825 "Gmsh.y" +#line 2827 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -5830,7 +5832,7 @@ case 279: ; break;} case 280: -#line 2843 "Gmsh.y" +#line 2845 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -5850,7 +5852,7 @@ case 280: ; break;} case 281: -#line 2861 "Gmsh.y" +#line 2863 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -5870,7 +5872,7 @@ case 281: ; break;} case 282: -#line 2879 "Gmsh.y" +#line 2881 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -5890,124 +5892,124 @@ case 282: ; break;} case 283: -#line 2897 "Gmsh.y" +#line 2899 "Gmsh.y" { yyval.d = GetValue(yyvsp[-3].c, yyvsp[-1].d); Free(yyvsp[-3].c); ; break;} case 284: -#line 2905 "Gmsh.y" +#line 2907 "Gmsh.y" { memcpy(yyval.v, yyvsp[0].v, 5*sizeof(double)); ; break;} case 285: -#line 2909 "Gmsh.y" +#line 2911 "Gmsh.y" { for(int i = 0; i < 5; i++) yyval.v[i] = -yyvsp[0].v[i]; ; break;} case 286: -#line 2913 "Gmsh.y" +#line 2915 "Gmsh.y" { for(int i = 0; i < 5; i++) yyval.v[i] = yyvsp[0].v[i]; ; break;} case 287: -#line 2917 "Gmsh.y" +#line 2919 "Gmsh.y" { for(int i = 0; i < 5; i++) yyval.v[i] = yyvsp[-2].v[i] - yyvsp[0].v[i]; ; break;} case 288: -#line 2921 "Gmsh.y" +#line 2923 "Gmsh.y" { for(int i = 0; i < 5; i++) yyval.v[i] = yyvsp[-2].v[i] + yyvsp[0].v[i]; ; break;} case 289: -#line 2928 "Gmsh.y" +#line 2930 "Gmsh.y" { yyval.v[0] = yyvsp[-9].d; yyval.v[1] = yyvsp[-7].d; yyval.v[2] = yyvsp[-5].d; yyval.v[3] = yyvsp[-3].d; yyval.v[4] = yyvsp[-1].d; ; break;} case 290: -#line 2932 "Gmsh.y" +#line 2934 "Gmsh.y" { yyval.v[0] = yyvsp[-7].d; yyval.v[1] = yyvsp[-5].d; yyval.v[2] = yyvsp[-3].d; yyval.v[3] = yyvsp[-1].d; yyval.v[4] = 1.0; ; break;} case 291: -#line 2936 "Gmsh.y" +#line 2938 "Gmsh.y" { yyval.v[0] = yyvsp[-5].d; yyval.v[1] = yyvsp[-3].d; yyval.v[2] = yyvsp[-1].d; yyval.v[3] = 0.0; yyval.v[4] = 1.0; ; break;} case 292: -#line 2940 "Gmsh.y" +#line 2942 "Gmsh.y" { yyval.v[0] = yyvsp[-5].d; yyval.v[1] = yyvsp[-3].d; yyval.v[2] = yyvsp[-1].d; yyval.v[3] = 0.0; yyval.v[4] = 1.0; ; break;} case 293: -#line 2947 "Gmsh.y" +#line 2949 "Gmsh.y" { ; break;} case 294: -#line 2950 "Gmsh.y" +#line 2952 "Gmsh.y" { yyval.l = yyvsp[-1].l; ; break;} case 295: -#line 2954 "Gmsh.y" +#line 2956 "Gmsh.y" { yyval.l = yyvsp[-1].l; ; break;} case 296: -#line 2961 "Gmsh.y" +#line 2963 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(List_T*)); List_Add(yyval.l, &(yyvsp[0].l)); ; break;} case 297: -#line 2966 "Gmsh.y" +#line 2968 "Gmsh.y" { List_Add(yyval.l, &(yyvsp[0].l)); ; break;} case 298: -#line 2974 "Gmsh.y" +#line 2976 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); List_Add(yyval.l, &(yyvsp[0].d)); ; break;} case 299: -#line 2979 "Gmsh.y" +#line 2981 "Gmsh.y" { yyval.l = yyvsp[0].l; ; break;} case 300: -#line 2983 "Gmsh.y" +#line 2985 "Gmsh.y" { // creates an empty list yyval.l = List_Create(2, 1, sizeof(double)); ; break;} case 301: -#line 2988 "Gmsh.y" +#line 2990 "Gmsh.y" { yyval.l = yyvsp[-1].l; ; break;} case 302: -#line 2992 "Gmsh.y" +#line 2994 "Gmsh.y" { yyval.l = yyvsp[-1].l; double *pd; @@ -6018,7 +6020,7 @@ case 302: ; break;} case 303: -#line 3004 "Gmsh.y" +#line 3006 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); for(double d = yyvsp[-2].d; (yyvsp[-2].d < yyvsp[0].d) ? (d <= yyvsp[0].d) : (d >= yyvsp[0].d); (yyvsp[-2].d < yyvsp[0].d) ? (d += 1.) : (d -= 1.)) @@ -6026,7 +6028,7 @@ case 303: ; break;} case 304: -#line 3010 "Gmsh.y" +#line 3012 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); if(!yyvsp[0].d || (yyvsp[-4].d < yyvsp[-2].d && yyvsp[0].d < 0) || (yyvsp[-4].d > yyvsp[-2].d && yyvsp[0].d > 0)){ @@ -6039,7 +6041,7 @@ case 304: ; break;} case 305: -#line 3021 "Gmsh.y" +#line 3023 "Gmsh.y" { // Returns the coordinates of a point and fills a list with it. // This allows to ensure e.g. that relative point positions are @@ -6061,7 +6063,7 @@ case 305: ; break;} case 306: -#line 3041 "Gmsh.y" +#line 3043 "Gmsh.y" { yyval.l = List_Create(List_Nbr(yyvsp[0].l), 1, sizeof(double)); for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){ @@ -6073,7 +6075,7 @@ case 306: ; break;} case 307: -#line 3051 "Gmsh.y" +#line 3053 "Gmsh.y" { yyval.l = List_Create(List_Nbr(yyvsp[0].l), 1, sizeof(double)); for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){ @@ -6085,7 +6087,7 @@ case 307: ; break;} case 308: -#line 3061 "Gmsh.y" +#line 3063 "Gmsh.y" { yyval.l = List_Create(List_Nbr(yyvsp[0].l), 1, sizeof(double)); for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){ @@ -6097,7 +6099,7 @@ case 308: ; break;} case 309: -#line 3071 "Gmsh.y" +#line 3073 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); Symbol TheSymbol; @@ -6116,7 +6118,7 @@ case 309: ; break;} case 310: -#line 3088 "Gmsh.y" +#line 3090 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); Symbol TheSymbol; @@ -6137,7 +6139,7 @@ case 310: ; break;} case 311: -#line 3107 "Gmsh.y" +#line 3109 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); Symbol TheSymbol; @@ -6163,7 +6165,7 @@ case 311: ; break;} case 312: -#line 3131 "Gmsh.y" +#line 3133 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); Symbol TheSymbol; @@ -6191,26 +6193,26 @@ case 312: ; break;} case 313: -#line 3160 "Gmsh.y" +#line 3162 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); List_Add(yyval.l, &(yyvsp[0].d)); ; break;} case 314: -#line 3165 "Gmsh.y" +#line 3167 "Gmsh.y" { yyval.l = yyvsp[0].l; ; break;} case 315: -#line 3169 "Gmsh.y" +#line 3171 "Gmsh.y" { List_Add(yyval.l, &(yyvsp[0].d)); ; break;} case 316: -#line 3173 "Gmsh.y" +#line 3175 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){ double d; @@ -6221,19 +6223,19 @@ case 316: ; break;} case 317: -#line 3186 "Gmsh.y" +#line 3188 "Gmsh.y" { yyval.u = CTX.PACK_COLOR((int)yyvsp[-7].d, (int)yyvsp[-5].d, (int)yyvsp[-3].d, (int)yyvsp[-1].d); ; break;} case 318: -#line 3190 "Gmsh.y" +#line 3192 "Gmsh.y" { yyval.u = CTX.PACK_COLOR((int)yyvsp[-5].d, (int)yyvsp[-3].d, (int)yyvsp[-1].d, 255); ; break;} case 319: -#line 3202 "Gmsh.y" +#line 3204 "Gmsh.y" { int flag; yyval.u = Get_ColorForString(ColorString, -1, yyvsp[0].c, &flag); @@ -6242,7 +6244,7 @@ case 319: ; break;} case 320: -#line 3209 "Gmsh.y" +#line 3211 "Gmsh.y" { unsigned int (*pColOpt)(int num, int action, unsigned int value); StringXColor *pColCat; @@ -6263,13 +6265,13 @@ case 320: ; break;} case 321: -#line 3231 "Gmsh.y" +#line 3233 "Gmsh.y" { yyval.l = yyvsp[-1].l; ; break;} case 322: -#line 3235 "Gmsh.y" +#line 3237 "Gmsh.y" { yyval.l = List_Create(256, 10, sizeof(unsigned int)); GmshColorTable *ct = Get_ColorTable((int)yyvsp[-3].d); @@ -6283,26 +6285,26 @@ case 322: ; break;} case 323: -#line 3250 "Gmsh.y" +#line 3252 "Gmsh.y" { yyval.l = List_Create(256, 10, sizeof(unsigned int)); List_Add(yyval.l, &(yyvsp[0].u)); ; break;} case 324: -#line 3255 "Gmsh.y" +#line 3257 "Gmsh.y" { List_Add(yyval.l, &(yyvsp[0].u)); ; break;} case 325: -#line 3262 "Gmsh.y" +#line 3264 "Gmsh.y" { yyval.c = yyvsp[0].c; ; break;} case 326: -#line 3266 "Gmsh.y" +#line 3268 "Gmsh.y" { yyval.c = (char *)Malloc(32*sizeof(char)); time_t now; @@ -6312,7 +6314,7 @@ case 326: ; break;} case 327: -#line 3274 "Gmsh.y" +#line 3276 "Gmsh.y" { yyval.c = (char *)Malloc((strlen(yyvsp[-3].c)+strlen(yyvsp[-1].c)+1)*sizeof(char)); strcpy(yyval.c, yyvsp[-3].c); @@ -6322,7 +6324,7 @@ case 327: ; break;} case 328: -#line 3282 "Gmsh.y" +#line 3284 "Gmsh.y" { yyval.c = (char *)Malloc((strlen(yyvsp[-1].c)+1)*sizeof(char)); int i; @@ -6338,7 +6340,7 @@ case 328: ; break;} case 329: -#line 3296 "Gmsh.y" +#line 3298 "Gmsh.y" { yyval.c = (char *)Malloc((strlen(yyvsp[-1].c)+1)*sizeof(char)); int i; @@ -6354,13 +6356,13 @@ case 329: ; break;} case 330: -#line 3310 "Gmsh.y" +#line 3312 "Gmsh.y" { yyval.c = yyvsp[-1].c; ; break;} case 331: -#line 3314 "Gmsh.y" +#line 3316 "Gmsh.y" { char tmpstring[1024]; int i = PrintListOfDouble(yyvsp[-3].c, yyvsp[-1].l, tmpstring); @@ -6381,7 +6383,7 @@ case 331: ; break;} case 332: -#line 3333 "Gmsh.y" +#line 3335 "Gmsh.y" { char* (*pStrOpt)(int num, int action, char *value); StringXString *pStrCat; @@ -6405,7 +6407,7 @@ case 332: ; break;} case 333: -#line 3355 "Gmsh.y" +#line 3357 "Gmsh.y" { char* (*pStrOpt)(int num, int action, char *value); StringXString *pStrCat; @@ -6650,7 +6652,7 @@ yyerrhandle: } return 1; } -#line 3378 "Gmsh.y" +#line 3380 "Gmsh.y" void DeleteSymbol(void *a, void *b){ diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 89f264639569525d3d462c9c28baf5dc461104c1..fb9bc23e1d9622e051263a3709084406f7477762 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -1,5 +1,5 @@ %{ -// $Id: Gmsh.y,v 1.230 2006-07-12 07:24:22 geuzaine Exp $ +// $Id: Gmsh.y,v 1.231 2006-08-07 13:57:17 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -1826,7 +1826,9 @@ Command : // open simultaneously. The right solution would be of course // to modify FunctionManager to reopen the files instead of // using the FILE pointer, but hey, I'm lazy... - ParseFile(tmpstring, 0, 0, 1); + Msg(STATUS2, "Reading '%s'", tmpstring); + ParseFile(tmpstring, 0, 1); + Msg(STATUS2, "Read '%s'", tmpstring); } else if(!strcmp($1, "Print")){ #if defined(HAVE_FLTK) diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index edfd47aa28d0417036005bd9be63ee9375fcbd5f..ba3f43c3c8adbda9451758e1b9065149eca1f63c 100644 --- a/Parser/Gmsh.yy.cpp +++ b/Parser/Gmsh.yy.cpp @@ -2,7 +2,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.268 2006-07-14 13:31:12 geuzaine Exp $ + * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.269 2006-08-07 13:57:17 geuzaine Exp $ */ #define FLEX_SCANNER @@ -727,7 +727,7 @@ char *yytext; #line 1 "Gmsh.l" #define INITIAL 0 #line 2 "Gmsh.l" -// $Id: Gmsh.yy.cpp,v 1.268 2006-07-14 13:31:12 geuzaine Exp $ +// $Id: Gmsh.yy.cpp,v 1.269 2006-08-07 13:57:17 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // diff --git a/Parser/OpenFile.cpp b/Parser/OpenFile.cpp index 88e53394c90d76ff83c4e3039ce8394b8abf3be5..0d6bf469b6b7d21ff5d8050c23605c754bde5e61 100644 --- a/Parser/OpenFile.cpp +++ b/Parser/OpenFile.cpp @@ -1,4 +1,4 @@ -// $Id: OpenFile.cpp,v 1.100 2006-08-07 00:08:09 geuzaine Exp $ +// $Id: OpenFile.cpp,v 1.101 2006-08-07 13:57:17 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -138,7 +138,7 @@ void SetBoundingBox(void) } } -int ParseFile(char *f, int silent, int close, int warn_if_missing) +int ParseFile(char *f, int close, int warn_if_missing) { char yyname_old[256], tmp[256]; FILE *yyin_old, *fp; @@ -147,8 +147,7 @@ int ParseFile(char *f, int silent, int close, int warn_if_missing) // add 'b' for pure Windows programs: opening in text mode messes up // fsetpos/fgetpos (used e.g. for user-defined functions) if(!(fp = fopen(f, "rb"))){ - if(warn_if_missing) - Msg(WARNING, "Unable to open file '%s'", f); + if(warn_if_missing) Msg(WARNING, "Unable to open file '%s'", f); return 0; } @@ -163,9 +162,6 @@ int ParseFile(char *f, int silent, int close, int warn_if_missing) yyerrorstate = 0; yylineno = 1; - if(!silent) - Msg(INFO, "Parsing file '%s'", yyname); - fpos_t position; fgetpos(yyin, &position); fgets(tmp, sizeof(tmp), yyin); @@ -187,11 +183,6 @@ int ParseFile(char *f, int silent, int close, int warn_if_missing) if(close) fclose(yyin); - if(!silent){ - Msg(INFO, "Parsed file '%s'", yyname); - Msg(STATUS2N, "Read '%s'", yyname); - } - if(GMODEL) delete GMODEL; GMODEL = new gmshModel; @@ -225,7 +216,7 @@ void ParseString(char *str) fprintf(fp, str); fprintf(fp, "\n"); fclose(fp); - ParseFile(CTX.tmp_filename_fullpath, 0, 1); + ParseFile(CTX.tmp_filename_fullpath, 1); } } @@ -258,6 +249,8 @@ int MergeProblem(char *name, int warn_if_missing) return 0; } + Msg(STATUS2, "Reading '%s'", name); + SplitFileName(name, base, ext); #if defined(HAVE_FLTK) @@ -351,10 +344,12 @@ int MergeProblem(char *name, int warn_if_missing) status = 0; } else { - status = ParseFile(name, 0, 1); + status = ParseFile(name, 1); } } + Msg(STATUS2, "Read '%s'", name); + fclose(fp); return status; diff --git a/Parser/OpenFile.h b/Parser/OpenFile.h index 6b288eda885ca6b74b405faeb6d94cee755fac2c..ff91f0092b17fe23ff8b569ef5bc5214b2ff1289 100644 --- a/Parser/OpenFile.h +++ b/Parser/OpenFile.h @@ -20,7 +20,7 @@ // // Please report all bugs and problems to <gmsh@geuz.org>. -int ParseFile(char *filename, int silent, int close, int warn_if_missing=0); +int ParseFile(char *filename, int close, int warn_if_missing=0); void ParseString(char *str); void OpenProblem(char *filename); void OpenProblemMacFinder(const char *filename);