sources/interface.cpp

changeset 52
ae5b486f6882
parent 51
481073b016a9
child 53
8f1a6f40d1b4
equal deleted inserted replaced
51:481073b016a9 52:ae5b486f6882
910 910
911 for (char ch : a) 911 for (char ch : a)
912 { 912 {
913 if (ch == '\n') 913 if (ch == '\n')
914 { 914 {
915 g_output[g_output.size() - 1].finalize(); 915 g_output.last().finalize();
916 g_output << ColoredLine(); 916 g_output << ColoredLine();
917 continue; 917 continue;
918 } 918 }
919 919
920 if (g_output[g_output.size() - 1].length() == 0) 920 if (g_output.last().length() == 0)
921 { 921 {
922 time_t now; 922 time_t now;
923 time (&now); 923 time (&now);
924 char timestamp[32]; 924 char timestamp[32];
925 strftime (timestamp, sizeof timestamp, "[%H:%M:%S] ", localtime (&now)); 925 strftime (timestamp, sizeof timestamp, "[%H:%M:%S] ", localtime (&now));
926 926
927 for (char* cp = timestamp; *cp != '\0'; ++cp) 927 for (char* cp = timestamp; *cp != '\0'; ++cp)
928 g_output[g_output.size() - 1].add_char (*cp); 928 g_output.last().add_char (*cp);
929 } 929 }
930 930
931 g_output[g_output.size() - 1].add_char (ch); 931 g_output.last().add_char (ch);
932 } 932 }
933 933
934 g_needOutputRender = true; 934 g_needOutputRender = true;
935 } 935 }
936 936

mercurial