Changeset c40d463d in OpenModelica
- Timestamp:
- 2017-09-15T02:47:46+02:00 (7 years ago)
- Branches:
- Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
- Children:
- 0c97493
- Parents:
- 7bd4847
- git-author:
- Adrian Pop <adrian.pop@…> (09/15/17 02:47:46)
- git-committer:
- hudson <openmodelica@…> (09/15/17 02:47:46)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Compiler/runtime/systemimpl.c
r60fecddd rc40d463d 2644 2644 #include "simulation_options.h" 2645 2645 2646 #define SB_SIZE 8192*2 2647 #define SB_SIZE_MINUS_ONE (SB_SIZE-1) 2648 2646 2649 char* System_getSimulationHelpTextSphinx(int detailed, int sphinx) 2647 2650 { 2648 static char buf[ 8192];2651 static char buf[SB_SIZE]; 2649 2652 int i,j; 2650 2653 const char **desc = detailed ? FLAG_DETAILED_DESC : FLAG_DESC; … … 2654 2657 { 2655 2658 if (sphinx) { 2656 cur += snprintf(cur, 8191-(buf-cur), "\n.. _simflag-%s :\n\n", FLAG_NAME[i]);2659 cur += snprintf(cur, SB_SIZE_MINUS_ONE-(buf-cur), "\n.. _simflag-%s :\n\n", FLAG_NAME[i]); 2657 2660 } 2658 2661 if (FLAG_TYPE[i] == FLAG_TYPE_FLAG) { 2659 2662 if (sphinx) { 2660 cur += snprintf(cur, 8191-(buf-cur), ":ref:`-%s <simflag-%s>`\n%s\n", FLAG_NAME[i], FLAG_NAME[i], desc[i]);2663 cur += snprintf(cur, SB_SIZE_MINUS_ONE-(buf-cur), ":ref:`-%s <simflag-%s>`\n%s\n", FLAG_NAME[i], FLAG_NAME[i], desc[i]); 2661 2664 } else { 2662 cur += snprintf(cur, 8191-(buf-cur), "<-%s>\n%s\n", FLAG_NAME[i], desc[i]);2665 cur += snprintf(cur, SB_SIZE_MINUS_ONE-(buf-cur), "<-%s>\n%s\n", FLAG_NAME[i], desc[i]); 2663 2666 } 2664 2667 } else if (FLAG_TYPE[i] == FLAG_TYPE_OPTION) { … … 2668 2671 const char **flagDesc; 2669 2672 if (sphinx) { 2670 cur += snprintf(cur, 8191-(buf-cur), ":ref:`-%s=value <simflag-%s>` *or* -%s value \n%s\n", FLAG_NAME[i], FLAG_NAME[i], FLAG_NAME[i], desc[i]);2673 cur += snprintf(cur, SB_SIZE_MINUS_ONE-(buf-cur), ":ref:`-%s=value <simflag-%s>` *or* -%s value \n%s\n", FLAG_NAME[i], FLAG_NAME[i], FLAG_NAME[i], desc[i]); 2671 2674 } else { 2672 cur += snprintf(cur, 8191-(buf-cur), "<-%s=value> or <-%s value>\n%s\n", FLAG_NAME[i], FLAG_NAME[i], desc[i]);2675 cur += snprintf(cur, SB_SIZE_MINUS_ONE-(buf-cur), "<-%s=value> or <-%s value>\n%s\n", FLAG_NAME[i], FLAG_NAME[i], desc[i]); 2673 2676 } 2674 2677 … … 2713 2716 2714 2717 if (numExtraFlags) { 2715 cur += snprintf(cur, 8191-(buf-cur), "\n");2718 cur += snprintf(cur, SB_SIZE_MINUS_ONE-(buf-cur), "\n"); 2716 2719 if (flagName) { 2717 2720 for (j=firstExtraFlag; j<numExtraFlags; j++) { 2718 cur += snprintf(cur, 8191-(buf-cur), " * %s (%s)\n", flagName[j], flagDesc[j]);2721 cur += snprintf(cur, SB_SIZE_MINUS_ONE-(buf-cur), " * %s (%s)\n", flagName[j], flagDesc[j]); 2719 2722 } 2720 2723 } else { 2721 2724 for (j=firstExtraFlag; j<numExtraFlags; j++) { 2722 cur += snprintf(cur, 8191-(buf-cur), " * %s\n", flagDesc[j]);2725 cur += snprintf(cur, SB_SIZE_MINUS_ONE-(buf-cur), " * %s\n", flagDesc[j]); 2723 2726 } 2724 2727 } … … 2726 2729 2727 2730 } else { 2728 cur += snprintf(cur, 8191-(buf-cur), "[unknown flag-type] <-%s>\n", FLAG_NAME[i]);2731 cur += snprintf(cur, SB_SIZE_MINUS_ONE-(buf-cur), "[unknown flag-type] <-%s>\n", FLAG_NAME[i]); 2729 2732 } 2730 2733 }
Note: See TracChangeset
for help on using the changeset viewer.