A bit of error checking when called with bad arguments. Needs more work.

Original commit message from CVS:
A bit of error checking when called with bad arguments.  Needs more work.
This commit is contained in:
David Schleef 2002-09-20 03:27:54 +00:00
parent c4f01ba01e
commit 01fde3c83c

View file

@ -57,8 +57,8 @@ int main(int argc,char *argv[]) {
comp_argument *argument;
enum_value *option;
gchar *prev_word = argv[3];
gchar *partial_word = argv[2];
gchar *prev_word;
gchar *partial_word;
int partial_len;
GList *elements;
GSList *pads;
@ -69,6 +69,14 @@ int main(int argc,char *argv[]) {
struct stat stat_buf;
if(argc<4){
fprintf(stderr,"gst-complete called with invalid arguments\n");
exit(1);
}
prev_word = argv[3];
partial_word = argv[2];
partial_len = strlen(partial_word);
/***** Loading the completion information from the registry *****/