Codebase list music123 / 9ef46a2
Fix formatting of full version string. nicolas.boulenguez 8 years ago
1 changed file(s) with 11 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
1010
1111 function N (Msg : String) return String renames Intl.Gettext;
1212
13 -- Set the major version here.
1314 Version_Number : constant String := "16";
15
16 -- Translate the format, then replace the major version.
1417 Version_Format : constant String
1518 := N ("music123 version %d by David Starner");
16 Version : constant String := Ada.Strings.Fixed.Insert
17 (Source => Version_Format,
18 Before => Ada.Strings.Fixed.Index (Version_Format, Pattern => "%d"),
19 New_Item => Version_Number);
19 Version_Index : constant Positive := Ada.Strings.Fixed.Index
20 (Source => Version_Format,
21 Pattern => "%d");
22 Version : constant String := Ada.Strings.Fixed.Replace_Slice
23 (Source => Version_Format,
24 Low => Version_Index,
25 High => Version_Index + 1,
26 By => Version_Number);
2027
2128 Noted_Error : exception;
2229