Skip to content

Commit

Permalink
Remove remaining trailing whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Nov 10, 2008
1 parent 969dd30 commit b6c3244
Show file tree
Hide file tree
Showing 897 changed files with 7,306 additions and 7,306 deletions.
6 changes: 3 additions & 3 deletions apps/clicky/src/cdriver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ GIOChannel *csocket_cdriver::start_connect(IPAddress addr, uint16_t port, bool *
// attach file descriptor
GIOChannel *socket = g_io_channel_unix_new(fd);
g_io_channel_set_encoding(socket, NULL, NULL);

// connect to port
struct sockaddr_in sa;
sa.sin_family = AF_INET;
Expand Down Expand Up @@ -183,7 +183,7 @@ gboolean csocket_cdriver::csocket_event(GIOCondition)
_csocket_watch = (guint) -1;
GatherErrorHandler *gerrh = _cr->error_handler();
int gerrh_pos = gerrh->size();

if (_csocket_state == csocket_connecting) {
int r = do_fd_connected(fd, gerrh);
if (r < 0)
Expand Down Expand Up @@ -214,7 +214,7 @@ gboolean csocket_cdriver::csocket_event(GIOCondition)
gerrh->message("(Expected a greeting of 'Click::ControlSocket/1.x'; got '%s'.)", str);
return kill_with_dialog(gerrh, gerrh_pos, 0);
}

_csocket_state = csocket_connected;
g_io_channel_set_buffered(_csocket, FALSE);
do_read("config", String(), 0);
Expand Down
16 changes: 8 additions & 8 deletions apps/clicky/src/cdriver.hh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace clicky {
class cdriver { public:

virtual ~cdriver() { }

enum { dflag_background = 1, dflag_clear = 2, dflag_nonraw = 4 };

virtual bool active() const = 0;
Expand All @@ -18,7 +18,7 @@ class cdriver { public:

static int check_handler_name(const String &inname, String &ename, String &hname, ErrorHandler *errh);
static void transfer_messages(crouter *rw, int status, const messagevector &messages);

};


Expand All @@ -31,14 +31,14 @@ class csocket_cdriver : public cdriver { public:

bool active() const;
int driver_mask() const;

void do_read(const String &hname, const String &hparam, int flags);
void do_write(const String &hname, const String &hvalue, int flags);
void do_check_write(const String &hname, int flags);

// actually private
gboolean csocket_event(GIOCondition);

private:

enum { csocket_failed, csocket_connecting, csocket_initial,
Expand All @@ -59,7 +59,7 @@ class csocket_cdriver : public cdriver { public:
size_t rdatapos;
size_t rdatalen;
bool ignore_newline;

msg(crouter *cr_, const String &hname_, const String &command_, int command_datalen_, int type_, int flags_)
: tnotify(cr_, 400), type(type_), flags(flags_), hname(hname_),
command(command_), command_datalen(command_datalen_),
Expand All @@ -78,7 +78,7 @@ class csocket_cdriver : public cdriver { public:
gboolean kill_with_dialog(GatherErrorHandler *gerrh, int gerrh_pos, const char *format, ...);
bool msg_parse(msg *m, GatherErrorHandler *gerrh, int gerrh_pos);
void add_msg(const String &hname, const String &command, int command_datalen, int type, int flags);

};


Expand All @@ -88,13 +88,13 @@ class clickfs_cdriver : public cdriver { public:

bool active() const;
int driver_mask() const;

void do_read(const String &hname, const String &hparam, int flags);
void do_write(const String &hname, const String &hvalue, int flags);
void do_check_write(const String &hname, int flags);

private:

crouter *_cr;
String _prefix;
bool _active;
Expand Down
24 changes: 12 additions & 12 deletions apps/clicky/src/clicky.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ main(int argc, char *argv[])

// local styles
String gtkrc_file = clickpath_find_file("clicky.gtkrc", "share/" PACKAGE, PACKAGE_DATA_DIR "/" PACKAGE);
// support for running before installing
// support for running before installing
if (!gtkrc_file && g_file_test("src/clicky", G_FILE_TEST_EXISTS))
gtkrc_file = clickpath_find_file("clicky.gtkrc", "", ".");
if (gtkrc_file)
gtk_rc_add_default_file(gtkrc_file.c_str());

gtk_set_locale();
bool have_gui = gtk_init_check(&argc, &argv);
add_pixmap_directory(PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
Expand All @@ -111,19 +111,19 @@ main(int argc, char *argv[])
Clp_Parser *clp =
Clp_NewParser(argc, argv, sizeof(options) / sizeof(options[0]), options);
program_name = Clp_ProgramName(clp);

String css_text;
Vector<String> wfiles;
Vector<int> wtypes;
bool do_pdf = false;
String pdf_file = "-";
double pdf_scale = 2.5;
bool pdf_multipage = false;

while (1) {
int opt = Clp_Next(clp);
switch (opt) {

case VERSION_OPT:
printf("clicky (Click) %s\n", CLICK_VERSION);
printf("Copyright (c) 2008 Regents of the University of California\n\
Expand Down Expand Up @@ -193,17 +193,17 @@ particular purpose.\n");
wfiles.push_back(clp->vstr);
wtypes.push_back(2);
break;

case Clp_BadOption:
exit(1);
break;

case Clp_Done:
goto done;

}
}

done:
// check exit conditions
if (!do_pdf && !have_gui) {
Expand All @@ -226,7 +226,7 @@ particular purpose.\n");
uint16_t port;
clicky::crouter *cr = 0;
clicky::wmain *wm = 0;

for (int i = 0; i < wfiles.size(); i++) {
if (!do_pdf)
cr = wm = new clicky::wmain;
Expand All @@ -238,7 +238,7 @@ particular purpose.\n");
GatherErrorHandler *gerrh = cr->error_handler();
cr->set_landmark(wtypes[i] == 1 ? "config" : wfiles[i]);
cr->set_ccss_text(css_text);

if (wtypes[i] == 1)
cr->set_config(wfiles[i], true);
else if (wtypes[i] == 2
Expand All @@ -263,7 +263,7 @@ particular purpose.\n");
if (wm)
wm->set_save_file(wfiles[i], (bool) s);
}

if (wm)
wm->show();
}
Expand Down
8 changes: 4 additions & 4 deletions apps/clicky/src/crouter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ crouter::throb_after::~throb_after()
void crouter::set_config(const String &conf, bool replace)
{
_gerrh.clear();

// check for archive
_conf = conf;
Vector<ArchiveElement> archive;
Expand Down Expand Up @@ -230,7 +230,7 @@ void crouter::set_config(const String &conf, bool replace)
delete emap;
delete processing;
}

on_config_changed(replace, lexinfo);

delete lexinfo;
Expand Down Expand Up @@ -306,7 +306,7 @@ static const char *parse_port(const char *s, const char *end, int &port)
static void parse_port(const String &str, String &name, int &port)
{
const char *s = str.begin(), *end = str.end();

port = -1;
s = parse_port(s, end, port);
if (s != end && end[-1] == ']') {
Expand All @@ -320,7 +320,7 @@ static void parse_port(const String &str, String &name, int &port)
/* nada */;
}
}

name = str.substring(s, end);
}

Expand Down
16 changes: 8 additions & 8 deletions apps/clicky/src/crouter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class crouter { public:
String landmark() const {
return _landmark;
}

// router
bool empty() const;
RouterT *router() const {
Expand Down Expand Up @@ -59,7 +59,7 @@ class crouter { public:
};
const reachable_t &downstream(const String &str);
const reachable_t &upstream(const String &str);

// errors
GatherErrorHandler *error_handler() const {
return &_gerrh;
Expand Down Expand Up @@ -121,7 +121,7 @@ class crouter { public:
int selected_driver() const {
return _selected_driver;
}

handler_values &hvalues() {
return _hvalues;
}
Expand All @@ -145,14 +145,14 @@ class crouter { public:

// diagram
void export_diagram(const char *filename, bool eps, cdiagram *cd);

virtual void repaint(const rectangle &rect) {
(void) rect;
}
virtual void repaint_if_visible(const rectangle &rect, double dimen) {
(void) rect, (void) dimen;
}

private:

String _landmark;
Expand All @@ -163,7 +163,7 @@ class crouter { public:
ProcessingT *_processing;
HashTable<String, reachable_t> _downstreams;
HashTable<String, reachable_t> _upstreams;

handler_values _hvalues;
cdriver *_driver;
bool _driver_active;
Expand Down Expand Up @@ -194,8 +194,8 @@ class crouter { public:
void export_matches(reachable_t &reach, ErrorHandler *debug_errh);
};
void calculate_reachable(const String &str, bool forward, reachable_t &reach);
};

};


inline const crouter::reachable_t &crouter::upstream(const String &str)
Expand Down
2 changes: 1 addition & 1 deletion apps/clicky/src/ddecor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void dfullness_decor::notify(crouter *cr, delt *e, handler_value *hv)
lv = cr->hvalues().find(e->flat_name() + "." + _dfs->length);
if (!cv && _dfs->capacity && _capacity < 0)
cv = cr->hvalues().find(e->flat_name() + "." + _dfs->capacity);

if (lv && !lv->have_hvalue())
lv->refresh(cr);
if (cv && !cv->have_hvalue())
Expand Down
16 changes: 8 additions & 8 deletions apps/clicky/src/ddecor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ddecor { public:
ddecor(ddecor *next)
: _next(next) {
}

virtual ~ddecor() {
}

Expand All @@ -32,19 +32,19 @@ class ddecor { public:
dd = dd->_next;
}
}

static void free_list(ddecor *&dd) {
while (dd) {
ddecor *n = dd->_next;
delete dd;
dd = n;
}
}

private:

ddecor *_next;

};


Expand All @@ -62,7 +62,7 @@ class dfullness_decor : public ddecor { public:
double _capacity;
double _hvalue;
double _drawn;

};


Expand All @@ -75,7 +75,7 @@ class dactivity_decor : public ddecor { public:
void notify(crouter *cr, delt *e, handler_value *hv);

gboolean on_decay();

private:

PermString _name;
Expand All @@ -97,7 +97,7 @@ class dactivity_decor : public ddecor { public:
guint _decay_source;

double clean_samples(double now, bool want_prev);

};

}
Expand Down
10 changes: 5 additions & 5 deletions apps/clicky/src/dialogs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void wmain::dialogs_connect()
void wmain::on_open_file()
{
static GtkFileFilter *filter;

GtkWidget *dialog = gtk_file_chooser_dialog_new("Open File",
GTK_WINDOW(_window),
GTK_FILE_CHOOSER_ACTION_OPEN,
Expand All @@ -216,7 +216,7 @@ void wmain::on_open_file()
}

gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);

if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
GatherErrorHandler gerrh;
Expand Down Expand Up @@ -276,7 +276,7 @@ bool cp_host_port(const String &hosts, const String &ports, IPAddress *result_ad
errh->error("IPv6 addresses not yet supported");
return false;
}

if (!cp_tcpudp_port(ports, IP_PROTO_TCP, result_port)) {
errh->error("'%s' does not describe a TCP port", ports.c_str());
return false;
Expand Down Expand Up @@ -400,7 +400,7 @@ void wmain::on_save_file(bool save_as)
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), dir);
g_free(dir);
}

if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_ACCEPT) {
gtk_widget_destroy(dialog);
return;
Expand Down Expand Up @@ -441,7 +441,7 @@ void wmain::on_export_diagram()
(const char *) NULL);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT);
gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE);

if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_ACCEPT) {
gtk_widget_destroy(dialog);
return;
Expand Down
Loading

0 comments on commit b6c3244

Please sign in to comment.