aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-04-07 02:12:02 +0000
committerNick Mathewson <nickm@torproject.org>2003-04-07 02:12:02 +0000
commitc217b1ca711538d5c6e49a56c1047e021eb0fb3c (patch)
tree39286439eb4e9e8481fb440d1de8a7c81291c1f9 /src/or
parentafa95ca47c06232f7395af0f7197eab61e1d91c3 (diff)
downloadtor-c217b1ca711538d5c6e49a56c1047e021eb0fb3c.tar
tor-c217b1ca711538d5c6e49a56c1047e021eb0fb3c.tar.gz
Add magic to end of C files to make emacs happy; split test invocation into separate file.
svn:r224
Diffstat (limited to 'src/or')
-rw-r--r--src/or/Makefile.am19
-rw-r--r--src/or/buffers.c7
-rw-r--r--src/or/circuit.c7
-rw-r--r--src/or/command.c7
-rw-r--r--src/or/config.c7
-rw-r--r--src/or/connection.c7
-rw-r--r--src/or/connection_ap.c8
-rw-r--r--src/or/connection_exit.c7
-rw-r--r--src/or/connection_op.c7
-rw-r--r--src/or/connection_or.c7
-rw-r--r--src/or/directory.c7
-rw-r--r--src/or/dns.c7
-rw-r--r--src/or/main.c9
-rw-r--r--src/or/onion.c7
-rw-r--r--src/or/or.h8
-rw-r--r--src/or/routers.c7
-rw-r--r--src/or/test.c15
-rw-r--r--src/or/tor_main.c18
18 files changed, 152 insertions, 9 deletions
diff --git a/src/or/Makefile.am b/src/or/Makefile.am
index bb84b0352..9b7c5a38a 100644
--- a/src/or/Makefile.am
+++ b/src/or/Makefile.am
@@ -1,19 +1,22 @@
+TESTS = test
-TESTS = test_config
-
-noinst_PROGRAMS = test_config
+noinst_PROGRAMS = test
bin_PROGRAMS = or
-or_LDADD = -L../common -lor -lz
-
or_SOURCES = buffers.c circuit.c command.c connection.c \
connection_exit.c connection_ap.c connection_op.c connection_or.c config.c \
- main.c onion.c routers.c directory.c dns.c
+ onion.c routers.c directory.c dns.c \
+ main.c tor_main.c
-test_config_SOURCES = test_config.c config.c
+or_LDADD = -L../common -lor -lz
+
+test_SOURCES = buffers.c circuit.c command.c connection.c \
+ connection_exit.c connection_ap.c connection_op.c connection_or.c config.c \
+ onion.c routers.c directory.c dns.c \
+ main.c test.c
-test_config_LDADD = -L../common -lor
+test_LDADD = -L../common -lor -lz
noinst_HEADERS = or.h tree.h
diff --git a/src/or/buffers.c b/src/or/buffers.c
index 074b8be2c..41889fc9f 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -252,3 +252,10 @@ int find_on_inbuf(char *string, int string_len,
return -1;
}
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/circuit.c b/src/or/circuit.c
index ed2234020..4de154a93 100644
--- a/src/or/circuit.c
+++ b/src/or/circuit.c
@@ -631,3 +631,10 @@ void circuit_dump_by_conn(connection_t *conn) {
}
}
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/command.c b/src/or/command.c
index f7876ec06..878d26e0a 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -300,3 +300,10 @@ void command_process_destroy_cell(cell_t *cell, connection_t *conn) {
circuit_free(circ);
}
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/config.c b/src/or/config.c
index 1e96ede16..d8828bdd3 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -369,3 +369,10 @@ int getconfig(int argc, char **argv, or_options_t *options) {
return result;
}
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/connection.c b/src/or/connection.c
index 97d5e112f..e2fc511b0 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -904,3 +904,10 @@ int connection_process_cell_from_inbuf(connection_t *conn) {
return connection_process_inbuf(conn); /* process the remainder of the buffer */
}
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/connection_ap.c b/src/or/connection_ap.c
index 787f77943..4983af6d1 100644
--- a/src/or/connection_ap.c
+++ b/src/or/connection_ap.c
@@ -539,3 +539,11 @@ int connection_ap_handle_listener_read(connection_t *conn) {
log(LOG_NOTICE,"AP: Received a connection request. Waiting for socksinfo.");
return connection_handle_listener_read(conn, CONN_TYPE_AP, AP_CONN_STATE_SOCKS_WAIT);
}
+
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/connection_exit.c b/src/or/connection_exit.c
index 2c2ffe1b6..45f8c6de7 100644
--- a/src/or/connection_exit.c
+++ b/src/or/connection_exit.c
@@ -389,3 +389,10 @@ int connection_exit_connect(connection_t *conn) {
return connection_exit_send_connected(conn);
}
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/connection_op.c b/src/or/connection_op.c
index 08ccb3da0..5a32c9ef3 100644
--- a/src/or/connection_op.c
+++ b/src/or/connection_op.c
@@ -121,3 +121,10 @@ int connection_op_handle_listener_read(connection_t *conn) {
return connection_handle_listener_read(conn, CONN_TYPE_OP, OP_CONN_STATE_AWAITING_KEYS);
}
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index ed3bd8be9..8a7fd9a90 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -740,3 +740,10 @@ int connection_or_handle_listener_read(connection_t *conn) {
return connection_handle_listener_read(conn, CONN_TYPE_OR, OR_CONN_STATE_SERVER_AUTH_WAIT);
}
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/directory.c b/src/or/directory.c
index 28344934b..e604445fe 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -293,3 +293,10 @@ int connection_dir_handle_listener_read(connection_t *conn) {
return connection_handle_listener_read(conn, CONN_TYPE_DIR, DIR_CONN_STATE_COMMAND_WAIT);
}
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/dns.c b/src/or/dns.c
index 0de83775f..22c36adee 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -568,3 +568,10 @@ static int dns_found_answer(char *question, uint32_t answer, uint32_t valid) {
return 0;
}
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/main.c b/src/or/main.c
index 2421a804f..3aaeb5b59 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -626,7 +626,7 @@ void daemonize() {
fclose(stderr);
}
-int main(int argc, char *argv[]) {
+int tor_main(int argc, char *argv[]) {
int retval = 0;
if(getconfig(argc,argv,&options))
@@ -657,3 +657,10 @@ int main(int argc, char *argv[]) {
return retval;
}
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/onion.c b/src/or/onion.c
index 514473b7b..e86553311 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -809,3 +809,10 @@ static int find_tracked_onion(unsigned char *onion, uint32_t onionlen) {
return 0;
}
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/or.h b/src/or/or.h
index 2c1a2e008..eebac263b 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -775,3 +775,11 @@ int router_get_list_from_file(char *routerfile);
int router_get_list_from_string(char *s);
#endif
+
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/routers.c b/src/or/routers.c
index 9a31b5d9e..486e8046a 100644
--- a/src/or/routers.c
+++ b/src/or/routers.c
@@ -532,3 +532,10 @@ void test_write_pkey(crypto_pk_env_t *pkey) {
}
#endif
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/test.c b/src/or/test.c
new file mode 100644
index 000000000..294dfddea
--- /dev/null
+++ b/src/or/test.c
@@ -0,0 +1,15 @@
+/* Copyright 2001,2002 Roger Dingledine, Matej Pfajfar. */
+/* See LICENSE for licensing information */
+/* $Id$ */
+
+int main(int c, char**v) {
+ return 0;
+}
+
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
diff --git a/src/or/tor_main.c b/src/or/tor_main.c
new file mode 100644
index 000000000..aee77b995
--- /dev/null
+++ b/src/or/tor_main.c
@@ -0,0 +1,18 @@
+/* Copyright 2001,2002 Roger Dingledine, Matej Pfajfar. */
+/* See LICENSE for licensing information */
+/* $Id$ */
+
+int tor_main(int argc, char *argv[]);
+
+int main(int argc, char *argv[])
+{
+ return tor_main(argc, argv);
+}
+
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/