Skip to content

Commit

Permalink
Gardening: Clean up trailing whitespace
Browse files Browse the repository at this point in the history
Remove trailing whitespace in "*.c",  "*.m",  "*.h" and "*.cpp" files.
  • Loading branch information
Nomis101 authored and sr55 committed Nov 4, 2019
1 parent da9aa8b commit 20fe4b6
Show file tree
Hide file tree
Showing 71 changed files with 294 additions and 294 deletions.
10 changes: 5 additions & 5 deletions gtk/src/queuehandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ ghb_queue_drag_n_drop_init(signal_user_data_t * ud)
widget = GHB_WIDGET(ud->builder, "queue_list");
targets = gdk_content_formats_new(queue_drag_entries,
G_N_ELEMENTS(queue_drag_entries));
gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_MOTION|GTK_DEST_DEFAULT_DROP,
gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_MOTION|GTK_DEST_DEFAULT_DROP,
targets, GDK_ACTION_MOVE);
gdk_content_formats_unref(targets);
}
Expand All @@ -110,7 +110,7 @@ ghb_queue_drag_n_drop_init(signal_user_data_t * ud)
GtkWidget * widget;

widget = GHB_WIDGET(ud->builder, "queue_list");
gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_MOTION|GTK_DEST_DEFAULT_DROP,
gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_MOTION|GTK_DEST_DEFAULT_DROP,
queue_drag_entries, 1, GDK_ACTION_MOVE);
}
#endif
Expand Down Expand Up @@ -281,7 +281,7 @@ queue_update_summary(GhbValue * queueDict, signal_user_data_t *ud)
"%dx%d storage, %dx%d display\n"
"%d:%d Pixel Aspect Ratio\n"
"%s Display Aspect Ratio"),
crop[0], crop[1], crop[2], crop[3],
crop[0], crop[1], crop[2], crop[3],
width, height, (int)display_width, display_height,
par_width, par_height, display_aspect);
widget = GHB_WIDGET(ud->builder, "queue_summary_dimensions");
Expand Down Expand Up @@ -1723,11 +1723,11 @@ ghb_low_disk_check(signal_user_data_t *ud)
_("%sThe destination filesystem is almost full: %"PRId64" MB free.\n"
"Destination: %s\n"
"Encode may be incomplete if you proceed.\n"),
paused_msg, free_size / (1024 * 1024), dest);
paused_msg, free_size / (1024 * 1024), dest);
gtk_dialog_add_buttons( GTK_DIALOG(dialog),
_("Resume, I've fixed the problem"), 1,
_("Resume, Don't tell me again"), 2,
_("Cancel Current and Stop"), 3,
_("Cancel Current and Stop"), 3,
NULL);
response = gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
Expand Down
2 changes: 1 addition & 1 deletion libhb/batch.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
It may be used under the terms of the GNU General Public License v2.
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#include "handbrake/handbrake.h"
#include "handbrake/lang.h"

Expand Down
8 changes: 4 additions & 4 deletions libhb/bd.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ static void add_audio(int track, hb_list_t *list_audio, BLURAY_STREAM_INFO *bdau

audio->config.lang.attributes = HB_AUDIO_ATTR_NONE;

snprintf( audio->config.lang.simple,
snprintf( audio->config.lang.simple,
sizeof( audio->config.lang.simple ), "%s",
strlen( lang->native_name ) ? lang->native_name : lang->eng_name );
snprintf( audio->config.lang.iso639_2,
snprintf( audio->config.lang.iso639_2,
sizeof( audio->config.lang.iso639_2 ), "%s", lang->iso639_2 );

hb_log("bd: audio id=0x%x, lang=%s (%s), 3cc=%s", audio->id,
Expand Down Expand Up @@ -436,7 +436,7 @@ hb_title_t * hb_bd_title_scan( hb_bd_t * d, int tt, uint64_t min_duration )
// All BD clips are not all required to have the same audio.
// But clips that have seamless transition are required
// to have the same audio as the previous clip.
// So find the clip that has the most other clips with the
// So find the clip that has the most other clips with the
// matching audio.
for ( ii = 0; ii < ti->clip_count; ii++ )
{
Expand Down Expand Up @@ -637,7 +637,7 @@ int hb_bd_main_feature( hb_bd_t * d, hb_list_t * list_title )
{
hb_title_t * title = hb_list_item( list_title, ii );
ti = d->title_info[title->index - 1];
if ( ti )
if ( ti )
{
BLURAY_STREAM_INFO * bdvideo = &ti->clips[0].video_streams[0];
if ( title->duration > longest_duration * 0.7 && bdvideo->format < 8 )
Expand Down
2 changes: 1 addition & 1 deletion libhb/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#ifdef HB_NEED_STRTOK_R
#include <string.h>

char *strtok_r(char *s, const char *delim, char **save_ptr)
char *strtok_r(char *s, const char *delim, char **save_ptr)
{
char *token;

Expand Down
8 changes: 4 additions & 4 deletions libhb/deccc608sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,8 @@ static int write_cc_buffer_as_ssa(struct eia608_screen *data,
safe_y = 0.1 * wb->height;
min_safe_x = 0.025 * cropped_width;
min_safe_y = 0.025 * cropped_height;
cell_height = (wb->height - 2 * safe_y) / 16;
cell_width = (wb->width - 2 * safe_x) / screen_columns;
cell_height = (wb->height - 2 * safe_y) / 16;
cell_width = (wb->width - 2 * safe_x) / screen_columns;

char *pos;
int y, x, top;
Expand Down Expand Up @@ -1365,7 +1365,7 @@ static void handle_command(unsigned char c1, const unsigned char c2,
}
erase_memory (wb,1);

// the last pts is the time to remove the previously
// the last pts is the time to remove the previously
// displayed CC from the display
wb->data608->current_visible_start_ms = wb->last_pts;
wb->data608->current_visible_scr_sequence = wb->last_scr_sequence;
Expand Down Expand Up @@ -1513,7 +1513,7 @@ static void handle_pac(unsigned char c1, unsigned char c2, struct s_write *wb)
font_text[wb->data608->font]);

// CC spec says to the preferred method to handle a roll-up base row
// that causes the display to scroll off the top of the screen is to
// that causes the display to scroll off the top of the screen is to
// adjust the base row down.
int keep_lines;
switch (wb->data608->mode)
Expand Down
16 changes: 8 additions & 8 deletions libhb/declpcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static void lpcmInfo( hb_work_object_t *w, hb_buffer_t *in )
* frames plus the start of the 7th, the second packet will contain the
* end of the 7th, 8-13 & the start of 14, etc. The frame structure is
* important because the PTS on the packet gives the time of the first
* frame that starts in the packet *NOT* the time of the first sample
* frame that starts in the packet *NOT* the time of the first sample
* in the packet. Also samples get split across packet boundaries
* so we can't assume that we can consume all the data in one packet
* on every call to the work routine.
Expand Down Expand Up @@ -132,7 +132,7 @@ static void lpcmInfo( hb_work_object_t *w, hb_buffer_t *in )
* of channels times the bits per sample divided by 8 to get bytes.
* (we have to compute in bits because 20 bit samples are not an integral
* number of bytes). We do all the multiplies first then the divides to
* avoid truncation errors.
* avoid truncation errors.
*/
/*
* Don't trust the number of frames given in the header. We've seen
Expand All @@ -143,11 +143,11 @@ static void lpcmInfo( hb_work_object_t *w, hb_buffer_t *in )
int samples = chunks * samples_per_chunk;

// Calculate number of frames that start in this packet
int frames = ( 90000 * samples / ( pv->samplerate * pv->nchannels ) +
int frames = ( 90000 * samples / ( pv->samplerate * pv->nchannels ) +
149 ) / 150;

pv->duration = frames * 150;
pv->nchunks = ( pv->duration * pv->nchannels * pv->samplerate +
pv->nchunks = ( pv->duration * pv->nchannels * pv->samplerate +
samples_per_chunk - 1 ) / ( 90000 * samples_per_chunk );
pv->nsamples = ( pv->duration * pv->samplerate ) / 90000;
pv->size = pv->nchunks * chunk_size;
Expand Down Expand Up @@ -183,7 +183,7 @@ static int declpcmInit( hb_work_object_t * w, hb_job_t * job )
return 0;
}

/*
/*
* Convert DVD encapsulated LPCM to floating point PCM audio buffers.
* The amount of audio in a PCM frame is always <= the amount that will fit
* in a DVD block (2048 bytes) but the standard doesn't require that the audio
Expand Down Expand Up @@ -238,7 +238,7 @@ static hb_buffer_t *Decode( hb_work_object_t *w )
{
hb_work_private_t *pv = w->private_data;
hb_buffer_t *out;

if (pv->nsamples == 0)
return NULL;

Expand All @@ -265,7 +265,7 @@ static hb_buffer_t *Decode( hb_work_object_t *w )
// Shifts below result in sign extension which gives
// us proper signed values. The final division adjusts
// the range to [-1.0 ... 1.0]
*odat++ = (float)( ( (int)( frm[0] << 24 ) >> 16 ) |
*odat++ = (float)( ( (int)( frm[0] << 24 ) >> 16 ) |
frm[1] ) / 32768.0;
frm += 2;
}
Expand Down Expand Up @@ -324,7 +324,7 @@ static hb_buffer_t *Decode( hb_work_object_t *w )
// us proper signed values. The final division adjusts
// the range to [-1.0 ... 1.0]
*odat++ = (float)( ( (int)( frm[0] << 24 ) >> 8 ) |
( frm[1] << 8 ) | lsb[0] ) /
( frm[1] << 8 ) | lsb[0] ) /
(256. * 32768.0);
frm += 2;
lsb++;
Expand Down
2 changes: 1 addition & 1 deletion libhb/decpgssub.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
It may be used under the terms of the GNU General Public License v2.
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#include "handbrake/handbrake.h"
#include "handbrake/hbffmpeg.h"

Expand Down
4 changes: 2 additions & 2 deletions libhb/decutf8sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

/*
* Decoder for UTF-8 subtitles obtained from file input-sources.
*
*
* Input and output packet format is UTF-8 encoded text,
* with limited HTML-style markup (only <b>, <i>, and <u>).
*
*
* @author David Foster (davidfstr)
*/

Expand Down
6 changes: 3 additions & 3 deletions libhb/decvobsub.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/*
* Decoder for DVD bitmap subtitles, also known as "VOB subtitles" within the HandBrake source code.
*
*
* Input format of the subtitle packets is described here:
* http://sam.zoy.org/writings/dvd/subtitles/
*
Expand Down Expand Up @@ -68,7 +68,7 @@ int decsubInit( hb_work_object_t * w, hb_job_t * job )

pv->job = job;
pv->pts = 0;

// Warn if the input color palette is empty
pv->palette_set = w->subtitle->palette_set;
if ( pv->palette_set )
Expand Down Expand Up @@ -180,7 +180,7 @@ int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
{
// If we don't get a valid next timestamp, use the stop time
// of the current sub as the start of the next.
// This can happen if reader invalidates timestamps while
// This can happen if reader invalidates timestamps while
// waiting for an audio to update the SCR.
pv->pts = pv->pts_stop;
pv->current_scr_sequence = pv->scr_sequence;
Expand Down
2 changes: 1 addition & 1 deletion libhb/detelecine.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ static int hb_detelecine_init( hb_filter_object_t * filter,
ctx->strict_breaks = -1;
ctx->metric_plane = 0;
ctx->parity = -1;

// "Skip" array [top, bottom, left, right]
hb_dict_extract_int(&ctx->junk_top, filter->settings, "skip-top");
hb_dict_extract_int(&ctx->junk_bottom, filter->settings, "skip-bottom");
Expand Down
8 changes: 4 additions & 4 deletions libhb/dvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,16 +983,16 @@ static hb_buffer_t * hb_dvdread_read( hb_dvd_t * e )
continue;
}
break;
} else {
// First retry the same block, then try the next one,
} else {
// First retry the same block, then try the next one,
// adjust the skip increment upwards so that we can skip
// large sections of bad blocks more efficiently (at the
// cost of some missed good blocks at the end).
hb_log( "dvd: vobu read error blk %d - skipping to next blk incr %d",
d->next_vobu, (read_retry * 10));
d->next_vobu += (read_retry * 10);
}

}

if( read_retry == 1024 )
Expand Down Expand Up @@ -1021,7 +1021,7 @@ static hb_buffer_t * hb_dvdread_read( hb_dvd_t * e )
hb_log("dvd: Lost sync, searching for NAV pack at blk %d",
d->next_vobu);
d->in_sync = 0;
}
}
continue;
}

Expand Down
Loading

0 comments on commit 20fe4b6

Please sign in to comment.