static unsigned long copy_strings(int argc,char ** argv,unsigned long *page,

                unsigned long p)

{

    char *tmp, *tmp1, *pag = NULL;

    int len, offset = 0;



    if (!p) {

	return 0;       /* bullet-proofing */

    }

    while (argc-- > 0) {

	if (!(tmp1 = tmp = get_user(argv+argc))) {

	    fprintf(stderr, "VFS: argc is wrong");

	    exit(-1);

	}

	while (get_user(tmp++));

	len = tmp - tmp1;

	if (p < len) {  /* this shouldn't happen - 128kB */

		return 0;

	}

	while (len) {

	    --p; --tmp; --len;

	    if (--offset < 0) {

		offset = p % TARGET_PAGE_SIZE;

                pag = (char *) page[p/TARGET_PAGE_SIZE];

                if (!pag) {

                    pag = (char *)get_free_page();

                    page[p/TARGET_PAGE_SIZE] = (unsigned long)pag;

                    if (!pag)

                        return 0;

		}

	    }

	    if (len == 0 || offset == 0) {

	        *(pag + offset) = get_user(tmp);

	    }

	    else {

	      int bytes_to_copy = (len > offset) ? offset : len;

	      tmp -= bytes_to_copy;

	      p -= bytes_to_copy;

	      offset -= bytes_to_copy;

	      len -= bytes_to_copy;

	      memcpy_fromfs(pag + offset, tmp, bytes_to_copy + 1);

	    }

	}

    }

    return p;

}

static unsigned long copy_strings(int argc,char ** argv,unsigned long *page,

                unsigned long p)

{

    char *tmp, *tmp1, *pag = NULL;

    int len, offset = 0;



    if (!p) {

	return 0;       

    }

    while (argc-- > 0) {

	if (!(tmp1 = tmp = get_user(argv+argc))) {

	    fprintf(stderr, "VFS: argc is wrong");

	    exit(-1);

	}

	while (get_user(tmp++));

	len = tmp - tmp1;

	if (p < len) {  

		return 0;

	}

	while (len) {

	    --p; --tmp; --len;

	    if (--offset < 0) {

		offset = p % TARGET_PAGE_SIZE;

                pag = (char *) page[p/TARGET_PAGE_SIZE];

                if (!pag) {

                    pag = (char *)get_free_page();

                    page[p/TARGET_PAGE_SIZE] = (unsigned long)pag;

                    if (!pag)

                        return 0;

		}

	    }

	    if (len == 0 || offset == 0) {

	        *(pag + offset) = get_user(tmp);

	    }

	    else {

	      int bytes_to_copy = (len > offset) ? offset : len;

	      tmp -= bytes_to_copy;

	      p -= bytes_to_copy;

	      offset -= bytes_to_copy;

	      len -= bytes_to_copy;

	      memcpy_fromfs(pag + offset, tmp, bytes_to_copy + 1);

	    }

	}

    }

    return p;

}

static unsigned long FUNC_0(int VAR_0,char ** VAR_1,unsigned long *VAR_2,

                unsigned long VAR_3)

{

    char *VAR_4, *VAR_5, *VAR_6 = NULL;

    int VAR_7, VAR_8 = 0;



    if (!VAR_3) {

	return 0;       

    }

    while (VAR_0-- > 0) {

	if (!(VAR_5 = VAR_4 = get_user(VAR_1+VAR_0))) {

	    fprintf(stderr, "VFS: VAR_0 is wrong");

	    exit(-1);

	}

	while (get_user(VAR_4++));

	VAR_7 = VAR_4 - VAR_5;

	if (VAR_3 < VAR_7) {  

		return 0;

	}

	while (VAR_7) {

	    --VAR_3; --VAR_4; --VAR_7;

	    if (--VAR_8 < 0) {

		VAR_8 = VAR_3 % TARGET_PAGE_SIZE;

                VAR_6 = (char *) VAR_2[VAR_3/TARGET_PAGE_SIZE];

                if (!VAR_6) {

                    VAR_6 = (char *)get_free_page();

                    VAR_2[VAR_3/TARGET_PAGE_SIZE] = (unsigned long)VAR_6;

                    if (!VAR_6)

                        return 0;

		}

	    }

	    if (VAR_7 == 0 || VAR_8 == 0) {

	        *(VAR_6 + VAR_8) = get_user(VAR_4);

	    }

	    else {

	      int VAR_9 = (VAR_7 > VAR_8) ? VAR_8 : VAR_7;

	      VAR_4 -= VAR_9;

	      VAR_3 -= VAR_9;

	      VAR_8 -= VAR_9;

	      VAR_7 -= VAR_9;

	      memcpy_fromfs(VAR_6 + VAR_8, VAR_4, VAR_9 + 1);

	    }

	}

    }

    return VAR_3;

}

static unsigned long FUNC_0(int VAR_0,char ** VAR_1,unsigned long *VAR_2,
unsigned long VAR_3)
{ char *VAR_4, *VAR_5, *VAR_6 = NULL; int VAR_7, VAR_8 = 0; if (!VAR_3) { return 0; } while (VAR_0-- > 0) { if (!(VAR_5 = VAR_4 = get_user(VAR_1+VAR_0))) { fprintf(stderr, "VFS: VAR_0 is wrong"); exit(-1); } while (get_user(VAR_4++)); VAR_7 = VAR_4 - VAR_5; if (VAR_3 < VAR_7) { return 0; } while (VAR_7) { --VAR_3; --VAR_4; --VAR_7; if (--VAR_8 < 0) { VAR_8 = VAR_3 % TARGET_PAGE_SIZE; VAR_6 = (char *) VAR_2[VAR_3/TARGET_PAGE_SIZE]; if (!VAR_6) { VAR_6 = (char *)get_free_page(); VAR_2[VAR_3/TARGET_PAGE_SIZE] = (unsigned long)VAR_6; if (!VAR_6)
return 0; } } if (VAR_7 == 0 || VAR_8 == 0) { *(VAR_6 + VAR_8) = get_user(VAR_4); } else { int VAR_9 = (VAR_7 > VAR_8) ? VAR_8 : VAR_7; VAR_4 -= VAR_9; VAR_3 -= VAR_9; VAR_8 -= VAR_9; VAR_7 -= VAR_9; memcpy_fromfs(VAR_6 + VAR_8, VAR_4, VAR_9 + 1); } } } return VAR_3; }