Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Spread resource structures among implementation files.
  • Loading branch information
i-rinat committed Dec 14, 2017
2 parents 4a29ab5 + 1313e4e commit 6834cbf
Show file tree
Hide file tree
Showing 160 changed files with 1,261 additions and 1,236 deletions.
34 changes: 19 additions & 15 deletions src/async_network.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,30 @@
*/

#include "async_network.h"
#include <glib.h>
#include <stdio.h>
#include <pthread.h>
#include <sys/types.h>
#include <sys/socket.h>
#include "config.h"
#include "pp_resource.h"
#include "ppb_core.h"
#include "ppb_host_resolver.h"
#include "ppb_message_loop.h"
#include "ppb_tcp_socket.h"
#include "ppb_udp_socket.h"
#include "trace.h"
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
#include <event2/event.h>
#include <event2/util.h>
#include <event2/dns.h>
#include <event2/event.h>
#include <event2/thread.h>
#include <event2/util.h>
#include <glib.h>
#include <netdb.h>
#include <netinet/in.h>
#include <ppapi/c/pp_errors.h>
#include <ppapi/c/private/ppb_net_address_private.h>
#include "pp_resource.h"
#include "ppb_core.h"
#include "trace.h"
#include "config.h"
#include "ppb_message_loop.h"

#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>

static struct event_base *event_b = NULL;
static struct evdns_base *evdns_b = NULL;
Expand Down
3 changes: 1 addition & 2 deletions src/async_network.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@
#pragma once

#include <ppapi/c/pp_completion_callback.h>
#include <ppapi/c/pp_resource.h>
#include <ppapi/c/pp_instance.h>
#include <ppapi/c/pp_resource.h>
#include <ppapi/c/private/ppb_net_address_private.h>


enum async_network_task_type_e {
ASYNC_NETWORK_TCP_CONNECT,
ASYNC_NETWORK_TCP_CONNECT_WITH_NETADDRESS,
Expand Down
1 change: 0 additions & 1 deletion src/audio_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

#include <stdint.h>


typedef enum {
STREAM_PLAYBACK,
STREAM_CAPTURE,
Expand Down
13 changes: 6 additions & 7 deletions src/audio_thread_alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@
*/

#include "audio_thread.h"
#include <asoundlib.h>
#include <pthread.h>
#include <glib.h>
#include <unistd.h>
#include "trace.h"
#include "config.h"
#include "utils.h"
#include "eintr_retry.h"
#include "ppb_message_loop.h"

#include "trace.h"
#include "utils.h"
#include <asoundlib.h>
#include <glib.h>
#include <pthread.h>
#include <unistd.h>

struct audio_stream_s {
audio_stream_direction direction;
Expand Down
12 changes: 6 additions & 6 deletions src/audio_thread_jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
*/

#include "audio_thread.h"
#include <pthread.h>
#include "config.h"
#include "trace.h"
#include <glib.h>
#include <jack/jack.h>
#include <jack/ringbuffer.h>
#include <math.h>
#include <pthread.h>
#include <soxr.h>
#include <glib.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "trace.h"
#include "config.h"
#include <string.h>

#define CLIENT_NAME "freshwrapper"

Expand Down
11 changes: 5 additions & 6 deletions src/audio_thread_noaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@
*/

#include "audio_thread.h"
#include <pthread.h>
#include <unistd.h>
#include <glib.h>
#include "trace.h"
#include "config.h"
#include "utils.h"
#include "eintr_retry.h"
#include "ppb_message_loop.h"

#include "trace.h"
#include "utils.h"
#include <glib.h>
#include <pthread.h>
#include <unistd.h>

struct audio_stream_s {
size_t sample_frame_count;
Expand Down
8 changes: 3 additions & 5 deletions src/audio_thread_pulseaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,15 @@
*/

#include "audio_thread.h"
#include "trace.h"
#include <glib.h>
#include <pthread.h>
#include <pulse/pulseaudio.h>
#include <pulse/mainloop.h>
#include <glib.h>
#include <pulse/pulseaudio.h>
#include <string.h>
#include "trace.h"


#define CLIENT_NAME "freshwrapper"


struct audio_stream_s {
struct pa_sample_spec sample_spec;
audio_stream_direction direction;
Expand Down
1 change: 0 additions & 1 deletion src/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#include "compat.h"


#ifdef VER
#error macro name collision
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

#pragma once

#include <glib.h>
#include <X11/Xlib.h>
#include "gtk_wrapper.h"
#include <X11/Xlib.h>
#include <glib.h>

#ifdef VER
#error macro name collision
Expand Down
13 changes: 6 additions & 7 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@
*/

#include "config.h"
#include "config_priv.h"
#include "config_parser/config_parser.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <locale.h>
#include <glib.h>
#include "config_priv.h"
#include "trace_core.h"

#include <glib.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

static struct fpp_config_s default_config = {
.audio_buffer_min_ms = 20,
Expand Down
1 change: 0 additions & 1 deletion src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

#include <stdint.h>


struct fpp_config_s {
int audio_buffer_min_ms;
int audio_buffer_max_ms;
Expand Down
3 changes: 1 addition & 2 deletions src/config_parser/config_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@

#include "config_parser.h"
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


struct cfg_s {
GHashTable *entries_ht;
cfg_report_error_f *error_func;
Expand Down
3 changes: 1 addition & 2 deletions src/encoding_alias.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@

#include "encoding_alias.h"
#include <glib.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>

#include <string.h>

enum {
UIGNORE = 0,
Expand Down
1 change: 0 additions & 1 deletion src/encoding_alias.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@

#pragma once


const char *
encoding_alias_get_canonical_name(const char *name);
7 changes: 4 additions & 3 deletions src/font.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@

#include "font.h"
#include "pp_resource.h"
#include "tables.h"
#include <ppapi/c/pp_errors.h>
#include "ppb_image_data.h"
#include "ppb_var.h"
#include "tables.h"
#include "trace.h"

#include <pango/pangocairo.h>
#include <ppapi/c/pp_errors.h>

struct PP_Var
fpp_font_get_font_families(void)
Expand Down
3 changes: 1 addition & 2 deletions src/font.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@

#pragma once

#include <pango/pango.h>
#include <ppapi/c/dev/ppb_font_dev.h>
#include <ppapi/c/trusted/ppb_browser_font_trusted.h>
#include <pango/pango.h>


struct fpp_font {
PangoFont *font;
Expand Down
5 changes: 5 additions & 0 deletions src/glx.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once

#define GLX_GLXEXT_LEGACY // prevent inclusion of glxext.h

#include <GL/glx.h>
3 changes: 1 addition & 2 deletions src/gtk_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@
#define _GNU_SOURCE

#include "gtk_wrapper.h"
#include "trace_core.h"
#include <link.h>
#include <stdio.h>
#include <string.h>
#include "trace_core.h"


static struct {
int major_version;
Expand Down
5 changes: 2 additions & 3 deletions src/gtk_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@

#pragma once

#include <glib.h>
#include <pango/pango.h>
#include <X11/Xlib.h>
#include <cairo.h>

#include <glib.h>
#include <pango/pango.h>

// GTK+ type mockups

Expand Down
5 changes: 2 additions & 3 deletions src/header_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@
*/

#include "header_parser.h"
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>

#include <stdlib.h>
#include <string.h>

struct parsed_headers_s *
hp_parse_headers(const char *headers)
Expand Down
4 changes: 3 additions & 1 deletion src/keycodeconvert.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@

#include "keycodeconvert.h"
#include "keycodepp.h"

#define XK_3270
#include <X11/keysym.h>

#include <X11/XF86keysym.h>
#include <X11/keysym.h>
#include <ppapi/c/ppb_input_event.h>

int
Expand Down
7 changes: 4 additions & 3 deletions src/main_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
*/

#include "main_thread.h"
#include "ppb_message_loop.h"
#include "pp_resource.h"
#include <pthread.h>
#include "ppb_instance.h"
#include "ppb_message_loop.h"
#include "trace.h"

#include "utils.h"
#include <pthread.h>

static
void
Expand Down
12 changes: 6 additions & 6 deletions src/n2p_proxy_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
*/

#include "n2p_proxy_class.h"
#include "ppapi/c/dev/deprecated_bool.h"
#include "trace.h"
#include "tables.h"
#include "pp_resource.h"
#include <npapi/npruntime.h>
#include "ppapi/c/dev/deprecated_bool.h"
#include "ppb_core.h"
#include "ppb_var.h"
#include "ppb_message_loop.h"
#include "ppb_var.h"
#include "tables.h"
#include "trace.h"
#include "utils.h"
#include <npapi/npruntime.h>
#include <ppapi/c/pp_errors.h>


struct has_property_param_s {
struct PP_Var name;
struct PP_Var *exception;
Expand Down
3 changes: 1 addition & 2 deletions src/np_asynccall.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@
*/

#include "np_asynccall.h"
#include "utils.h"
#include "trace_core.h"
#include "utils.h"
#include <glib.h>
#include <glib-unix.h>

static GMainContext *g_main_context_of_main_thread;

Expand Down
Loading

0 comments on commit 6834cbf

Please sign in to comment.