diff options
author | Thomas Brand <tom@trellis.ch> | 2019-02-20 14:59:19 +0100 |
---|---|---|
committer | Thomas Brand <tom@trellis.ch> | 2019-02-20 14:59:19 +0100 |
commit | 8c57a9e808f4f21ee262bd8ef24d4a246ce8a0f9 (patch) | |
tree | 5486c3b06826f30f30940baeaa78a838b0baa049 | |
parent | 2387a2d90895755d851f063928f198dd42e1676c (diff) | |
download | jack2-8c57a9e808f4f21ee262bd8ef24d4a246ce8a0f9.tar.gz |
NO-OP: tabs vs. spaces indentation.
-rw-r--r-- | example-clients/connect.c | 48 | ||||
-rw-r--r-- | example-clients/lsp.c | 28 |
2 files changed, 38 insertions, 38 deletions
diff --git a/example-clients/connect.c b/example-clients/connect.c index 0f4f8be5..b4b183f7 100644 --- a/example-clients/connect.c +++ b/example-clients/connect.c @@ -37,7 +37,7 @@ volatile int done = 0; void port_connect_callback(jack_port_id_t a, jack_port_id_t b, int connect, void* arg) { - done = 1; + done = 1; } void @@ -80,11 +80,11 @@ main (int argc, char *argv[]) int rc = 1; struct option long_options[] = { - { "server", 1, 0, 's' }, - { "help", 0, 0, 'h' }, - { "version", 0, 0, 'v' }, - { "uuid", 0, 0, 'u' }, - { 0, 0, 0, 0 } + { "server", 1, 0, 's' }, + { "help", 0, 0, 'h' }, + { "version", 0, 0, 'v' }, + { "uuid", 0, 0, 'u' }, + { 0, 0, 0, 0 } }; while ((c = getopt_long (argc, argv, "s:hvu", long_options, &option_index)) >= 0) { @@ -140,7 +140,7 @@ main (int argc, char *argv[]) return 1; } - jack_set_port_connect_callback(client, port_connect_callback, NULL); + jack_set_port_connect_callback(client, port_connect_callback, NULL); /* find the two ports */ @@ -183,11 +183,11 @@ main (int argc, char *argv[]) if ((port1 = jack_port_by_name(client, portA)) == 0) { fprintf (stderr, "ERROR %s not a valid port\n", portA); goto exit; - } + } if ((port2 = jack_port_by_name(client, portB)) == 0) { fprintf (stderr, "ERROR %s not a valid port\n", portB); goto exit; - } + } port1_flags = jack_port_flags (port1); port2_flags = jack_port_flags (port2); @@ -209,11 +209,11 @@ main (int argc, char *argv[]) goto exit; } - /* tell the JACK server that we are ready to roll */ - if (jack_activate (client)) { - fprintf (stderr, "cannot activate client"); - goto exit; - } + /* tell the JACK server that we are ready to roll */ + if (jack_activate (client)) { + fprintf (stderr, "cannot activate client"); + goto exit; + } /* connect the ports. Note: you can't do this before the client is activated (this may change in the future). @@ -221,25 +221,25 @@ main (int argc, char *argv[]) if (connecting) { if (jack_connect(client, jack_port_name(src_port), jack_port_name(dst_port))) { - fprintf (stderr, "cannot connect client, already connected?\n"); + fprintf (stderr, "cannot connect client, already connected?\n"); goto exit; } } if (disconnecting) { if (jack_disconnect(client, jack_port_name(src_port), jack_port_name(dst_port))) { - fprintf (stderr, "cannot disconnect client, already disconnected?\n"); + fprintf (stderr, "cannot disconnect client, already disconnected?\n"); goto exit; } } - // Wait for connection/disconnection to be effective - while(!done) { - #ifdef WIN32 - Sleep(10); - #else - usleep(10000); - #endif - } + // Wait for connection/disconnection to be effective + while(!done) { +#ifdef WIN32 + Sleep(10); +#else + usleep(10000); +#endif + } /* everything was ok, so setting exitcode to 0 */ rc = 0; diff --git a/example-clients/lsp.c b/example-clients/lsp.c index a8990a58..f63c0f0d 100644 --- a/example-clients/lsp.c +++ b/example-clients/lsp.c @@ -58,7 +58,7 @@ main (int argc, char *argv[]) { jack_client_t *client; jack_status_t status; - jack_options_t options = JackNoStartServer; + jack_options_t options = JackNoStartServer; const char **ports, **connections; unsigned int i, j, k; int skip_port; @@ -75,7 +75,7 @@ main (int argc, char *argv[]) jack_port_t *port; struct option long_options[] = { - { "server", 1, 0, 's' }, + { "server", 1, 0, 's' }, { "aliases", 0, 0, 'A' }, { "connections", 0, 0, 'c' }, { "port-latency", 0, 0, 'l' }, @@ -97,10 +97,10 @@ main (int argc, char *argv[]) while ((c = getopt_long (argc, argv, "s:AclLphvt", long_options, &option_index)) >= 0) { switch (c) { case 's': - server_name = (char *) malloc (sizeof (char) * strlen(optarg)); - strcpy (server_name, optarg); - options |= JackServerName; - break; + server_name = (char *) malloc (sizeof (char) * strlen(optarg)); + strcpy (server_name, optarg); + options |= JackServerName; + break; case 'A': aliases[0] = (char *) malloc (jack_port_name_size()); aliases[1] = (char *) malloc (jack_port_name_size()); @@ -153,8 +153,8 @@ main (int argc, char *argv[]) } ports = jack_get_ports (client, NULL, NULL, 0); - if (!ports) - goto error; + if (!ports) + goto error; for (i = 0; ports && ports[i]; ++i) { // skip over any that don't match ALL of the strings presented at command line @@ -241,12 +241,12 @@ main (int argc, char *argv[]) } error: - if (show_aliases) { - free(aliases[0]); - free(aliases[1]); - } - if (ports) - jack_free (ports); + if (show_aliases) { + free(aliases[0]); + free(aliases[1]); + } + if (ports) + jack_free (ports); jack_client_close (client); exit (0); } |