From 09c436b68afe21d62b4031841d85926d1c0d969c Mon Sep 17 00:00:00 2001 From: AngelCarpintero Date: Sat, 21 Jan 2006 03:14:32 +0000 Subject: [PATCH] * fix many typos in comments ( i ran aspell against the code ). http://www.lavrsen.dk/twiki/bin/view/Motion/FixTypoInComments --- README.MacOSX | 2 +- alg.c | 6 +++--- conf.c | 14 +++++++------- event.c | 2 +- ffmpeg.h | 2 +- motion-dist.conf | 4 ++-- motion.h | 6 +++--- netcam.c | 2 +- netcam.h | 8 ++++---- netcam_ftp.c | 2 +- netcam_jpeg.c | 4 ++-- picture.c | 10 +++++----- rotate.c | 2 +- video.c | 10 +++++----- video_freebsd.c | 6 +++--- webcam.c | 8 ++++---- webhttpd.c | 6 +++--- 17 files changed, 47 insertions(+), 47 deletions(-) diff --git a/README.MacOSX b/README.MacOSX index 30af16c..45f8841 100644 --- a/README.MacOSX +++ b/README.MacOSX @@ -1,6 +1,6 @@ The motion port to MacOSX is only working with network cameras. - Tested in lastest MacOSX + Tested in latest MacOSX Packages needed : diff --git a/alg.c b/alg.c index 617217c..8997b4e 100644 --- a/alg.c +++ b/alg.c @@ -114,7 +114,7 @@ void alg_locate_center_size(struct images *imgs, int width, int height, struct c if (centc) { cent->minx = cent->x - xdist/centc*2; cent->maxx = cent->x + xdist/centc*2; - /* Make the box a litle bigger in y direction to make sure the + /* Make the box a little bigger in y direction to make sure the heads fit in so we multiply by 3 instead of 2 which seems to to work well in practical */ cent->miny = cent->y - ydist/centc*3; @@ -837,7 +837,7 @@ int alg_diff_standard (struct context *cnt, unsigned char *new) } /* Next, compare the multiplied absolute differences with the multiplied - * noise level (repeted as 4 words in mm7), resulting in a "motion flag" + * noise level (repeated as 4 words in mm7), resulting in a "motion flag" * for each pixel. * * Since pcmpgtw performs signed comparisons, we have to subtract noise, @@ -950,7 +950,7 @@ int alg_diff_standard (struct context *cnt, unsigned char *new) if (smartmask_speed) { if (curdiff > noise) { - /* increase smart_mask sesitivity every frame when motion + /* increase smart_mask sensitivity every frame when motion is detected. (with speed=5, mask is increased by 1 every second. To be able to increase by 5 every second (with speed=10) we add 5 here. NOT related to the 5 at ratio- diff --git a/conf.c b/conf.c index a5719de..28de73d 100644 --- a/conf.c +++ b/conf.c @@ -2,7 +2,7 @@ ** ** conf.c ** - ** I originaly wrote conf.c as part of the drpoxy package + ** I originally wrote conf.c as part of the drpoxy package ** thanks to Matthew Pratt and others for their additions. ** ** Copyright 1999 Jeroen Vreeken (pe1rxq@chello.nl) @@ -668,7 +668,7 @@ config_param config_params[] = { }, { "text_event", - "# This option defines the value of the speciel event conversion specifier %C\n" + "# This option defines the value of the special event conversion specifier %C\n" "# You can use any conversion specifier in this option except %C. Date and time\n" "# values are from the timestamp of the first image in the current event.\n" "# Default: %Y%m%d%H%M%S\n" @@ -846,7 +846,7 @@ config_param config_params[] = { "############################################################\n\n" "# Type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc, 4=generic)\n" "# The generic type enables the definition of motion center and motion size to\n" - "# be used with the convertion specifiers for options like on_motion_detected", + "# be used with the conversion specifiers for options like on_motion_detected", TRACK_OFFSET(type), copy_int, print_int @@ -1539,7 +1539,7 @@ void malloc_strings (struct context * cnt) ***********************************************************************/ /* copy_bool assigns a config option to a new boolean value. - * The boolean is given as a string in str which is coverted to 0 or 1 + * The boolean is given as a string in str which is converted to 0 or 1 * by the function. Values 1, yes and on are converted to 1 ignoring case. * Any other value is converted to 0. */ @@ -1562,8 +1562,8 @@ static struct context **copy_bool (struct context **cnt, const char *str, int va return cnt; } -/* copy_int assigns a config option to a new interger value. - * The integer is given as a string in str which is coverted to integer by the function. +/* copy_int assigns a config option to a new integer value. + * The integer is given as a string in str which is converted to integer by the function. */ static struct context ** copy_int(struct context **cnt, const char *str, int val_ptr) { @@ -1620,7 +1620,7 @@ struct context **copy_string(struct context **cnt, const char *str, int val_ptr) * * from - pointer to the new string we want to copy * to - the pointer to the current string (or pointing to NULL) - * If not NULL the memory it points to is fre'ed. + * If not NULL the memory it points to is free'd. * function returns pointer to the new string which is in malloc'ed memory * FIXME The strings that are malloc'ed with this function should be freed * when the motion program is terminated normally instead of relying on the diff --git a/event.c b/event.c index f3ccad9..f357ca7 100644 --- a/event.c +++ b/event.c @@ -43,7 +43,7 @@ static void exec_command(struct context *cnt, char *command, char *filename, int setsid(); /* - * Close any file descripter except console because we will + * Close any file descriptor except console because we will * like to see error messages */ for (i = getdtablesize(); i > 2; --i) diff --git a/ffmpeg.h b/ffmpeg.h index 4a9a7a1..0c90bf0 100644 --- a/ffmpeg.h +++ b/ffmpeg.h @@ -16,7 +16,7 @@ struct ffmpeg { AVStream *video_st; AVCodecContext *c; - AVFrame *picture; /* contains default imaga pointers */ + AVFrame *picture; /* contains default image pointers */ uint8_t *video_outbuf; int video_outbuf_size; diff --git a/motion-dist.conf b/motion-dist.conf index 48fd7eb..ce1a15d 100644 --- a/motion-dist.conf +++ b/motion-dist.conf @@ -292,7 +292,7 @@ text_right %Y-%m-%d\n%T-%q # Text is placed in upper right corner text_changes off -# This option defines the value of the speciel event conversion specifier %C +# This option defines the value of the special event conversion specifier %C # You can use any conversion specifier in this option except %C. Date and time # values are from the timestamp of the first image in the current event. # Default: %Y%m%d%H%M%S @@ -406,7 +406,7 @@ control_html_output on # Type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc, 4=generic) # The generic type enables the definition of motion center and motion size to -# be used with the convertion specifiers for options like on_motion_detected +# be used with the conversion specifiers for options like on_motion_detected track_type 0 # Enable auto tracking (default: off) diff --git a/motion.h b/motion.h index 84b88c7..672b97c 100644 --- a/motion.h +++ b/motion.h @@ -168,9 +168,9 @@ * Location Purpose * * conf The values in conf reflect width and height set in the - * configuration file. These can be set via xmlrpc, but they are - * not used internally by Motion, so it won't break anything. - * These values are transferred to imgs in vid_start. + * configuration file. These can be set via http remote control, + * but they are not used internally by Motion, so it won't break + * anything. These values are transferred to imgs in vid_start. * * imgs The values in imgs are the actual output dimensions. Normally * the output dimensions are the same as the capture dimensions, diff --git a/netcam.c b/netcam.c index eda383c..ef343b4 100644 --- a/netcam.c +++ b/netcam.c @@ -26,7 +26,7 @@ * is accessed. The other type is one which supplies an mjpeg * stream of data. * - * For each of these cameras, the routinei taking care of the netcam + * For each of these cameras, the routine taking care of the netcam * will start up a completely separate thread (which I call the "camera * handler thread" within subsequent comments). For a streaming camera, * this handler will receive the mjpeg stream of data from the camera, diff --git a/netcam.h b/netcam.h index e188140..226cedf 100644 --- a/netcam.h +++ b/netcam.h @@ -24,7 +24,7 @@ /* * We are aiming to get the gcc compilation of motion practically "warning * free", when using all the possible warning switches. The following macro - * is to allow some function protypes to include parameters which, at the + * is to allow some function prototypes to include parameters which, at the * moment, are not used, but either still "need to be declared", or else are * planned to be used in the near future. Eventually this macro will go into * motion.h, but that will be a little later. @@ -120,7 +120,7 @@ typedef struct netcam_context { pthread_mutex_t mutex; /* mutex used with conditional waits */ pthread_cond_t exiting; /* pthread condition structure to let - the camera-handler acknowlege that + the camera-handler acknowledge that it's finished */ pthread_cond_t cap_cond; /* pthread condition structure to @@ -172,7 +172,7 @@ typedef struct netcam_context { int (*get_image)(netcam_context_ptr); /* Function to fetch the image from the netcam. It is initialised in - netcam_setup depending upon whetheer + netcam_setup depending upon whether the picture source is from an http server or from an ftp server */ @@ -199,7 +199,7 @@ typedef struct netcam_context { data from the camera */ netcam_buff_ptr jpegbuf; /* This buffer is used for jpeg - decompresssion */ + decompression */ int imgcnt; /* count for # of received jpegs */ int imgcnt_last; /* remember last count to check if a new diff --git a/netcam_ftp.c b/netcam_ftp.c index 8ad9c21..c2e9705 100644 --- a/netcam_ftp.c +++ b/netcam_ftp.c @@ -478,7 +478,7 @@ int ftp_connect(netcam_context_ptr netcam) { * * ctxt pointer to an FTP context * -* Returns -1 incase of error, 0 otherwise +* Returns -1 in case of error, 0 otherwise */ static int ftp_get_connection(ftp_context_pointer ctxt) { diff --git a/netcam_jpeg.c b/netcam_jpeg.c index 4e55bbd..9097070 100644 --- a/netcam_jpeg.c +++ b/netcam_jpeg.c @@ -1,7 +1,7 @@ /* * netcam_jpeg.c * - * Module for handling JPEG decompression fornetwork cameras. + * Module for handling JPEG decompression for network cameras. * * This code was inspired by the original module written by * Jeroen Vreeken and enhanced by several Motion project @@ -162,7 +162,7 @@ static void netcam_memory_src(j_decompress_ptr cinfo, char *data, int length) * netcam_error_exit * * Routine to override the libjpeg error exit routine so - * that we can just thow away the bad frame and continue + * that we can just throw away the bad frame and continue * with more data from the netcam. * * Parameters diff --git a/picture.c b/picture.c index 57d0b80..e049853 100644 --- a/picture.c +++ b/picture.c @@ -87,7 +87,7 @@ static GLOBAL(int) jpeg_mem_size(j_compress_ptr cinfo) * Inputs: * - image_size is the size of the input image buffer. * - input_image is the image in YUV420P format. - * - width and height are the dimentions of the image + * - width and height are the dimensions of the image * - quality is the jpeg encoding quality 0-100% * Output: * - dest_image is a pointer to the jpeg image buffer @@ -155,7 +155,7 @@ static int put_jpeg_yuv420p_memory(unsigned char *dest_image, int image_size, * Inputs: * - image_size is the size of the input image buffer. * - input_image is the image in grayscale format. - * - width and height are the dimentions of the image + * - width and height are the dimensions of the image * - quality is the jpeg encoding quality 0-100% * Output: * - dest_image is a pointer to the jpeg image buffer @@ -201,7 +201,7 @@ static int put_jpeg_grey_memory(unsigned char *dest_image, int image_size, unsig * it to an already open file. * Inputs: * - image is the image in YUV420P format. - * - width and height are the dimentions of the image + * - width and height are the dimensions of the image * - quality is the jpeg encoding quality 0-100% * Output: * - The jpeg is written directly to the file given by the file pointer fp @@ -265,7 +265,7 @@ static void put_jpeg_yuv420p_file(FILE *fp, unsigned char *image, int width, int * it to an already open file. * Inputs: * - image is the image in greyscale format. - * - width and height are the dimentions of the image + * - width and height are the dimensions of the image * - quality is the jpeg encoding quality 0-100% * Output: * - The jpeg is written directly to the file given by the file pointer fp @@ -307,7 +307,7 @@ static void put_jpeg_grey_file(FILE *picture, unsigned char *image, int width, i * it to an already open file. * Inputs: * - image is the image in YUV420P format. - * - width and height are the dimentions of the image + * - width and height are the dimensions of the image * Output: * - The PPM is written directly to the file given by the file pointer fp * Returns nothing diff --git a/rotate.c b/rotate.c index e5273a6..c7889c5 100644 --- a/rotate.c +++ b/rotate.c @@ -50,7 +50,7 @@ typedef unsigned TYPE_32BIT __uint32; /** * The code below is copied (with modification) from bits/byteswap.h. It provides * a macro/function named rot__bswap_32 that swaps the bytes in a 32-bit integer, - * preferrably using the bswap assembler instruction if configure found support + * preferably using the bswap assembler instruction if configure found support * for it. * * It would be neater to simply include byteswap.h and use the bswap_32 macro diff --git a/video.c b/video.c index a35adb4..40dba03 100644 --- a/video.c +++ b/video.c @@ -95,7 +95,7 @@ static void v4l_picture_controls(struct context *cnt, struct video_dev *viddev) if (ioctl(dev, VIDIOCGPICT, &vid_pic)==-1) motion_log(LOG_ERR, 1, "ioctl (VIDIOCGPICT)"); } - /* average is above window - turn down brigtness - go for the target */ + /* average is above window - turn down brightness - go for the target */ if (avg > brightness_window_high) { step = MIN2((avg - brightness_target)/5+1, viddev->brightness); if (viddev->brightness > step+1) { @@ -104,7 +104,7 @@ static void v4l_picture_controls(struct context *cnt, struct video_dev *viddev) make_change = 1; } } - /* average is below window - turn up brigtness - go for the target */ + /* average is below window - turn up brightness - go for the target */ if (avg < brightness_window_low) { step = MIN2((brightness_target - avg)/5+1, 255 - viddev->brightness); if (viddev->brightness < 255-step ) { @@ -509,7 +509,7 @@ static int v4l_open_vidpipe(void) fprintf(stderr,"\t%s", buffer); - /* Read explaination line */ + /* Read explanation line */ if (!fgets(buffer, 255, vloopbacks)) { motion_log(LOG_ERR, 1, "Unable to read vloopback explanation line"); @@ -720,7 +720,7 @@ void vid_cleanup(void) * - Width and height are checked for valid value (multiple of 16) * - Copy the config height and width to the imgs struct. Note that height and width are * only copied to the from the conf struct to the imgs struct during program startup - * The width and height can no leter be changed via http remote control as this would + * The width and height can no later be changed via http remote control as this would * require major re-memory allocations of all image buffers. * - Setup basic V4L properties incl palette incl setting * - Open the device @@ -733,7 +733,7 @@ void vid_cleanup(void) * viddevs The viddevs struct is "global" within the context of video.c * and used in functions vid_*. * vid_mutex Mutex needed to handle exclusive access to the viddevs struct when - * each thread adds a new video device durig startup calling vid_start + * each thread adds a new video device during startup calling vid_start * * Returns * device number diff --git a/video_freebsd.c b/video_freebsd.c index c4505b1..eb34fd4 100644 --- a/video_freebsd.c +++ b/video_freebsd.c @@ -594,7 +594,7 @@ static unsigned char *v4l_start(struct context *cnt, struct video_dev *viddev, i } /* if (ioctl(dev_bktr, METEORSACTPIXFMT, &pixelformat) < 0 ){ - motion_log(LOG_ERR, 1, "set enconding method BSD_VIDFMT_I420"); + motion_log(LOG_ERR, 1, "set encoding method BSD_VIDFMT_I420"); return(NULL); } @@ -734,7 +734,7 @@ static int v4l_next(struct video_dev *viddev,unsigned char *map, int width, int if (viddev->capture_method == CAPTURE_CONTINOUS){ if (ioctl(dev_bktr, METEORCAPTUR, &continous) < 0) { - motion_log(LOG_ERR, 1, "Error capturing using continous method"); + motion_log(LOG_ERR, 1, "Error capturing using continuous method"); sigprocmask (SIG_UNBLOCK, &old, NULL); return (-1); } @@ -825,7 +825,7 @@ static void v4l_set_input(struct context *cnt, struct video_dev *viddev, unsigne vid_init - Allocate viddev struct. vid_start - Setup Device parameters ( device , channel , freq , contrast , hue , saturation , brightness ) and open it. -vid_next - Capture a frame and set input , contrast , hue , saturation and brighness if necesary. +vid_next - Capture a frame and set input , contrast , hue , saturation and brightness if necessary. vid_close - close devices. vid_cleanup - Free viddev struct. diff --git a/webcam.c b/webcam.c index ef14b42..84f7739 100644 --- a/webcam.c +++ b/webcam.c @@ -32,8 +32,8 @@ -/* This function sets up a TCP/IP socket for incomming requests. It is called only during - * initiatization of Motion from the function webcam_init +/* This function sets up a TCP/IP socket for incoming requests. It is called only during + * initialisation of Motion from the function webcam_init * The function sets up a a socket on the port number given by _port_. * If the parameter _local_ is not zero the socket is setup to only accept connects from localhost. * Otherwise any client IP address is accepted. The function returns an integer representing the socket. @@ -133,7 +133,7 @@ static void webcam_flush(struct webcam *list, int *stream_count, int lim) client->tmpbuffer->size - client->filepos); /* If any data has been written, update the - * data pointer and set the "workdone flag + * data pointer and set the workdone flag */ if (written>0) { client->filepos+=written; @@ -284,7 +284,7 @@ static int webcam_check_write(struct webcam *list) /* This function is called from motion.c for each motion thread starting up. - * The function setup the incomming tcp socket that the clients connect to + * The function setup the incoming tcp socket that the clients connect to * The function returns an integer representing the socket. */ int webcam_init(struct context *cnt) diff --git a/webhttpd.c b/webhttpd.c index 8c3e9ee..e5270a1 100644 --- a/webhttpd.c +++ b/webhttpd.c @@ -438,7 +438,7 @@ static int config(char *pointer, char *res, int length_uri, int thread, int clie warningkill = sscanf(pointer,"%1024s", Value); length_uri = length_uri - strlen(Value); if ( (length_uri == 0) && (strlen(Value) > 0) ) { - /* FIXME need to asure that is a valid value */ + /* FIXME need to assure that is a valid value */ url_decode(Value,strlen(Value)); conf_cmdparse(cnt + thread, config_params[i].param_name, Value); if (cnt[0]->conf.control_html_output) { @@ -593,7 +593,7 @@ static int config(char *pointer, char *res, int length_uri, int thread, int clie length_uri = length_uri - 3; if ((length_uri > 7) && (question == '?')) { - /* 8 -> query=param_name FIXME minimun length param_name */ + /* 8 -> query=param_name FIXME minimum length param_name */ pointer++; length_uri--; warningkill = sscanf(pointer,"%256[a-z]%c", command, &question); @@ -1985,7 +1985,7 @@ static int read_client(int client_socket, void *userdata, char *auth) /* A valid auth request. Process it. */ } } else { - // Resquest Authorithation + // Request Authorization char response[1024]={'\0'}; snprintf (response, sizeof (response),request_auth_response_template, method); warningkill = write (client_socket, response, strlen (response));