Skip to content

Commit

Permalink
fix spelling and code standard compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelCarpintero authored and AngelCarpintero committed Apr 5, 2010
1 parent 07f9e36 commit 3e53086
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 47 deletions.
2 changes: 1 addition & 1 deletion alg.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ static int alg_labeling(struct context *cnt)
}

MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO, "%s: %i Labels found. Largest connected Area: %i Pixel(s). "
"Largest Label: %i", imgs->largest_label, imgs->labelsize_max,
"Largest Label: %i", imgs->largest_label, imgs->labelsize_max,
cnt->current_image->total_labels);

/* Return group of significant labels. */
Expand Down
20 changes: 10 additions & 10 deletions conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct config conf_template = {
tuner_device: NULL,
#endif
video_device: VIDEO_DEVICE,
v4l2_palette: DEF_PALETTE,
v4l2_palette: DEF_PALETTE,
vidpipe: NULL,
filepath: NULL,
imagepath: DEF_IMAGEPATH,
Expand Down Expand Up @@ -224,9 +224,9 @@ config_param config_params[] = {
},
{
"log_type",
"# Filter to log messages by type (STR, ENC, NET, DBL, EVT, TRK, VID, ALL). (default: ALL)",
"# Filter to log messages by type (STR, ENC, NET, DBL, EVT, TRK, VID, ALL). (default: ALL)",
1,
CONF_OFFSET(log_type_str),
CONF_OFFSET(log_type_str),
copy_string,
print_string
},
Expand Down Expand Up @@ -400,7 +400,7 @@ config_param config_params[] = {
{
"netcam_tolerant_check",
"# Set less strict jpeg checks for network cameras with a poor/buggy firmware.\n"
"# Default: off",
"# Default: off",
0,
CONF_OFFSET(netcam_tolerant_check),
copy_bool,
Expand Down Expand Up @@ -658,7 +658,7 @@ config_param config_params[] = {
print_int
},
{
"picture_type",
"picture_type",
"# Type of output images\n"
"# Valid values: jpeg, ppm (default: jpeg)",
0,
Expand Down Expand Up @@ -758,7 +758,7 @@ config_param config_params[] = {
},
#endif /* HAVE_FFMPEG */
{
"use_extpipe",
"use_extpipe",
"\n############################################################\n"
"# External pipe to video encoder\n"
"# Replacement for FFMPEG builtin encoder for ffmpeg_output_movies only.\n"
Expand Down Expand Up @@ -1074,7 +1074,7 @@ config_param config_params[] = {
CONF_OFFSET(webcontrol_authentication),
copy_string,
print_string
},
},
{
"track_type",
"\n############################################################\n"
Expand Down Expand Up @@ -1401,13 +1401,13 @@ config_param config_params[] = {
print_string
},
{
"database_dbname",
"database_dbname",
"# database to log to (default: not defined)",
0,
CONF_OFFSET(database_dbname),
copy_string,
print_string
},
},
{
"database_host",
"# The host on which the database is located (default: not defined)",
Expand Down Expand Up @@ -1462,7 +1462,7 @@ config_param config_params[] = {
"# Video Loopback Device (vloopback project)\n"
"############################################################\n\n"
"# Output images to a video4linux loopback device\n"
"# The value '-' means next available (default: not defined)",
"# The value '-' means next available (default: not defined)",
0,
CONF_OFFSET(vidpipe),
copy_string,
Expand Down
18 changes: 9 additions & 9 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for motion trunkREV502.
# Generated by GNU Autoconf 2.64 for motion trunkREV504.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
Expand Down Expand Up @@ -546,8 +546,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='motion'
PACKAGE_TARNAME='motion'
PACKAGE_VERSION='trunkREV502'
PACKAGE_STRING='motion trunkREV502'
PACKAGE_VERSION='trunkREV504'
PACKAGE_STRING='motion trunkREV504'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1210,7 +1210,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures motion trunkREV502 to adapt to many kinds of systems.
\`configure' configures motion trunkREV504 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1271,7 +1271,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of motion trunkREV502:";;
short | recursive ) echo "Configuration of motion trunkREV504:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1412,7 +1412,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
motion configure trunkREV502
motion configure trunkREV504
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2009,7 +2009,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by motion $as_me trunkREV502, which was
It was created by motion $as_me trunkREV504, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -5790,7 +5790,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by motion $as_me trunkREV502, which was
This file was extended by motion $as_me trunkREV504, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -5850,7 +5850,7 @@ Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
motion config.status trunkREV502
motion config.status trunkREV504
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Expand Down
2 changes: 1 addition & 1 deletion ffmpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ static int mpeg1_write_trailer(AVFormatContext *s)
void ffmpeg_init()
{
MOTION_LOG(ERR, TYPE_ENCODER, NO_ERRNO, "%s: ffmpeg LIBAVCODEC_BUILD %d"
" LIBAVFORMAT_BUILD %d", LIBAVCODEC_BUILD, LIBAVFORMAT_BUILD);
" LIBAVFORMAT_BUILD %d", LIBAVCODEC_BUILD, LIBAVFORMAT_BUILD);
av_register_all();

#if LIBAVCODEC_BUILD > 4680
Expand Down
4 changes: 2 additions & 2 deletions jpegutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ int decode_jpeg_gray_raw(unsigned char *jpeg_data, int len,
numfields = 2;
} else {
MOTION_LOG(ERR, TYPE_ALL, NO_ERRNO, "%s: Read JPEG: requested height = %d, "
"height of image = %d", height, dinfo.output_height);
"height of image = %d", height, dinfo.output_height);
goto ERR_EXIT;
}

Expand Down Expand Up @@ -1089,7 +1089,7 @@ int encode_jpeg_raw(unsigned char *jpeg_data, int len, int quality,

if ((width > 4096) || (height > 4096)) {
MOTION_LOG(ERR, TYPE_ALL, NO_ERRNO, "%s: Image dimensions (%dx%d) exceed"
" lavtools' max (4096x4096)", width, height);
" lavtools' max (4096x4096)", width, height);
goto ERR_EXIT;
}

Expand Down
12 changes: 6 additions & 6 deletions logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void motion_log(int level, unsigned int type, int errno_flag, const char *fmt, .

/*
* Prefix the message with the log level string, log type string,
* time and thread number. i.ex [1] [ERR] [ENC] [Apr 03 00:08:44] blah
* time and thread number. e.g. [1] [ERR] [ENC] [Apr 03 00:08:44] blah
*
*/
if (!log_mode) {
Expand All @@ -198,17 +198,17 @@ void motion_log(int level, unsigned int type, int errno_flag, const char *fmt, .
} else {
/*
* Prefix the message with the log level string, log type string
* and thread number. i.ex [1] [DBG] [TRK] blah
* and thread number. e.g. [1] [DBG] [TRK] blah
*/
n = snprintf(buf, sizeof(buf), "[%d] [%s] [%s] ",
threadnr, get_log_level_str(level), get_log_type_str(type));
}

/* Next add the user's message */
/* Next add the user's message. */
va_start(ap, fmt);
n += vsnprintf(buf + n, sizeof(buf) - n, fmt, ap);

/* If errno_flag is set, add on the library error message */
/* If errno_flag is set, add on the library error message. */
if (errno_flag) {
strncat(buf, ": ", 1024 - strlen(buf));
n += 2;
Expand Down Expand Up @@ -237,15 +237,15 @@ void motion_log(int level, unsigned int type, int errno_flag, const char *fmt, .
fputs(buf, logfile);
fflush(logfile);

/* If log_mode, send the message to the syslog */
/* If log_mode, send the message to the syslog. */
} else {
syslog(level, "%s", buf);
strncat(buf, "\n", 1024 - strlen(buf));
fputs(buf, stderr);
fflush(stderr);
}

/* Clean up the argument list routine */
/* Clean up the argument list routine. */
va_end(ap);
}

2 changes: 1 addition & 1 deletion motion.1
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Values: Max 4095 characters / Default: Not defined
.br
pipe raw video to generally - 'STDIN', allowing to use an external video encoder.
.br
i.ex with memcoder :
e.g. using memcoder :
.br
extpipe mencoder -demuxer rawvideo -rawvideo w=320:h=240:i420 -ovc x264 -x264encopts bframes=4:frameref=1:subq=1:scenecut=-1:nob_adapt: threads=1:keyint=1000:8x8dct:vbv_bufsize=4000:crf=24:partitions=i8x8,i4x4:vbv_maxrate=800:no-chroma-me -vf denoise3d=16:12:48:4,pp=lb -of avi -o %f.avi - -fps %fps
.TP
Expand Down
6 changes: 3 additions & 3 deletions motion.c
Original file line number Diff line number Diff line change
Expand Up @@ -2505,8 +2505,8 @@ static void setup_signals(struct sigaction *sig_handler_action, struct sigaction
sigaction(SIGCHLD, sigchild_action, NULL);
sigaction(SIGPIPE, sigchild_action, NULL);
sigaction(SIGALRM, sig_handler_action, NULL);
sigaction(SIGHUP, sig_handler_action, NULL);
sigaction(SIGINT, sig_handler_action, NULL);
sigaction(SIGHUP, sig_handler_action, NULL);
sigaction(SIGINT, sig_handler_action, NULL);
sigaction(SIGQUIT, sig_handler_action, NULL);
sigaction(SIGTERM, sig_handler_action, NULL);
sigaction(SIGUSR1, sig_handler_action, NULL);
Expand Down Expand Up @@ -2732,7 +2732,7 @@ int main (int argc, char **argv)

if (cnt_list[i]->watchdog == 0) {
MOTION_LOG(ERR, TYPE_ALL, NO_ERRNO, "%s: Thread %d - Watchdog timeout, trying to do "
"a graceful restart", cnt_list[i]->threadnr);
"a graceful restart", cnt_list[i]->threadnr);
cnt_list[i]->finish = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion netcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,7 @@ static int netcam_read_html_jpeg(netcam_context_ptr netcam)
MOTION_LOG(NTC, TYPE_NETCAM, NO_ERRNO,
"%s: Potential split boundary - "
"%d chars flushed, %d "
"re-positioned", ix,
"re-positioned", ix,
(int) netcam->response->buffer_left);

memmove(netcam->response->buffer, ptr,
Expand Down
4 changes: 2 additions & 2 deletions netcam_jpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ int netcam_proc_jpeg(netcam_context_ptr netcam, unsigned char *image)
* netcam->mutex to do this.
*/
MOTION_LOG(INF, TYPE_NETCAM, NO_ERRNO, "%s: processing jpeg image"
" - content length %d", netcam->latest->content_length);
" - content length %d", netcam->latest->content_length);

ret = netcam_init_jpeg(netcam, &cinfo);

Expand All @@ -466,7 +466,7 @@ int netcam_proc_jpeg(netcam_context_ptr netcam, unsigned char *image)
retval = NETCAM_RESTART_ERROR;
MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO, "%s: Camera width/height mismatch "
"with JPEG image - expected %dx%d, JPEG %dx%d",
" retval %d", netcam->width, netcam->height,
" retval %d", netcam->width, netcam->height,
cinfo.output_width, cinfo.output_height, retval);
return retval;
}
Expand Down
6 changes: 2 additions & 4 deletions picture.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,15 +599,13 @@ void put_picture(struct context *cnt, char *file, unsigned char *image, int ftyp
if (errno == EACCES) {
MOTION_LOG(ERR, TYPE_ALL, SHOW_ERRNO,
"%s: Can't write picture to file %s - check access rights to target directory\n"
"Thread is going to finish due to this fatal error",
file);
"Thread is going to finish due to this fatal error", file);
cnt->finish = 1;
cnt->restart = 0;
return;
} else {
/* If target dir is temporarily unavailable we may survive. */
MOTION_LOG(ERR, TYPE_ALL, SHOW_ERRNO, "%s: Can't write picture to file %s",
file);
MOTION_LOG(ERR, TYPE_ALL, SHOW_ERRNO, "%s: Can't write picture to file %s", file);
return;
}
}
Expand Down
2 changes: 1 addition & 1 deletion rotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ void rotate_init(struct context *cnt)
*/
if ((cnt->conf.rotate_deg % 90) > 0) {
MOTION_LOG(ERR, TYPE_ALL, NO_ERRNO, "%s: Config option \"rotate\" not a multiple of 90: %d",
cnt->conf.rotate_deg);
cnt->conf.rotate_deg);
cnt->conf.rotate_deg = 0; /* Disable rotation. */
cnt->rotate_data.degrees = 0; /* Force return below. */
} else {
Expand Down
2 changes: 1 addition & 1 deletion track.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static unsigned int stepper_command(struct context *cnt, unsigned int motor,
}


static unsigned int stepper_status(struct context *cnt, unsigned int motor)
static unsigned int stepper_status(struct context *cnt, unsigned int motor)
{
return stepper_command(cnt, motor, STEPPER_COMMAND_STATUS, 0);
}
Expand Down
2 changes: 1 addition & 1 deletion video.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ void v4l_set_input(struct context *cnt, struct video_dev *viddev, unsigned char

if (ioctl (dev, VIDIOCSCHAN, &vid_chnl) == -1) {
MOTION_LOG(ERR, TYPE_VIDEO, SHOW_ERRNO, "%s: ioctl (VIDIOCSCHAN) Input %d"
" Standard method %d", input, norm);
" Standard method %d", input, norm);
return;
}

Expand Down
6 changes: 3 additions & 3 deletions video2.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* - setting tuner - NOT TESTED
* - access to V4L2 device controls is missing. Partially added but requires some improvements likely.
* - changing resolution at run-time may not work.
* - ucvideo svn r75 or above to work with MJPEG ( i.ex Logitech 5000 pro )
* - ucvideo svn r75 or above to work with MJPEG ( e.g. Logitech 5000 pro )
* This work is inspired by fswebcam and current design of motion.
* This interface has been tested with ZC0301 driver from kernel 2.6.17.3 and Labtec's usb camera (PAS202 sensor)
Expand Down Expand Up @@ -204,7 +204,7 @@ static int v4l2_get_capability(src_v4l2_t * vid_source)
"cap.driver: \"%s\"\n"
"cap.card: \"%s\"\n"
"cap.bus_info: \"%s\"\n"
"cap.capabilities=0x%08X\n------------------------",
"cap.capabilities=0x%08X\n------------------------",
vid_source->cap.driver, vid_source->cap.card, vid_source->cap.bus_info,
vid_source->cap.capabilities);

Expand Down Expand Up @@ -469,7 +469,7 @@ static int v4l2_set_pix_format(struct context *cnt, src_v4l2_t * vid_source, int
}

MOTION_LOG(ERR, TYPE_VIDEO, NO_ERRNO, "%s: Using palette %c%c%c%c (%dx%d) bytesperlines %d sizeimage "
"%d colorspace %08x", pixformat >> 0, pixformat >> 8, pixformat >> 16,
"%d colorspace %08x", pixformat >> 0, pixformat >> 8, pixformat >> 16,
pixformat >> 24, *width, *height, vid_source->dst_fmt.fmt.pix.bytesperline,
vid_source->dst_fmt.fmt.pix.sizeimage, vid_source->dst_fmt.fmt.pix.colorspace);

Expand Down
2 changes: 1 addition & 1 deletion video_freebsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ static int set_hue(int viddev, int new_hue)
return -1;
}

MOTION_LOG(NTC, TYPE_VIDEO, NO_ERRNO, "%s: to [%d]", ioctlval);
MOTION_LOG(NTC, TYPE_VIDEO, NO_ERRNO, "%s: to [%d]", ioctlval);

return ioctlval;
}
Expand Down

0 comments on commit 3e53086

Please sign in to comment.