# # patch "ChangeLog" # from [683818fdb59ab01eb7b399f0fbd1a0e0931899b9] # to [6871b8300b9727089bfdf4c290d87e87cc5afa06] # # patch "ui.cc" # from [c2e8c87e5b0de5106ab35fbcc356b069474c6994] # to [e42166c04687d0d23d1432cbd3861246352a3e9f] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,12 @@ +2005-05-18 Richard Levitte + + * ui.cc: Move the copyright and license section to the top of the + file, and add an emacs mode specifier. + * ui.cc (write_ticks): Change the counter ticker so the trailer + comes at the end of the counter line instead of the title line. + This is especially important for code that changes the trailer + a little now and then. + 2005-05-15 graydon hoare * rcs_import.cc (note_state_at_branch_beginning): collect --- ui.cc +++ ui.cc @@ -1,3 +1,13 @@ +// -*- mode: C++; c-file-style: "gnu"; indent-tabs-mode: nil -*- +// copyright (C) 2002, 2003 graydon hoare +// all rights reserved. +// licensed to the public under the terms of the GNU GPL (>= 2) +// see the file COPYING for details + +// this file contains a couple utilities to deal with the user +// interface. the global user_interface object 'ui' owns clog, so no +// writing to it directly! + #include "config.h" #include "platform.hh" #include "sanity.hh" @@ -8,15 +18,6 @@ #include #include -// copyright (C) 2002, 2003 graydon hoare -// all rights reserved. -// licensed to the public under the terms of the GNU GPL (>= 2) -// see the file COPYING for details - -// this file contains a couple utilities to deal with the user -// interface. the global user_interface object 'ui' owns clog, so no -// writing to it directly! - using namespace std; using boost::lexical_cast; struct user_interface ui; @@ -137,7 +138,11 @@ tickline2 += count; } - tickline1 += ui.tick_trailer; + if (ui.tick_trailer.size() > 0) + { + tickline2 += " "; + tickline2 += ui.tick_trailer; + } size_t curr_sz = tickline2.size(); if (curr_sz < last_tick_len) @@ -149,15 +154,13 @@ { if (tw && tickline1.size() > tw) { - // first character in tickline is "\r", which does not take up any - // width, so we add 1 to compensate. - tickline1.resize(tw + 1); + tickline1.resize(tw); } clog << tickline1 << "\n"; } if (tw && tickline2.size() > tw) { - // first character in tickline is "\r", which does not take up any + // first character in tickline2 is "\r", which does not take up any // width, so we add 1 to compensate. tickline2.resize(tw + 1); }