if ((cp = (char *)strstr(link_info, "pagelen=")) != NULL) {
if ((cp = strstr(link_info, "pagelen=")) != NULL) {
PUBLIC int printfile ARGS1(	document *,	newdoc){    BOOLEAN Lpansi = FALSE;    DocAddress WWWDoc;    char *content_base = NULL;    char *content_location = NULL;    char *cp = NULL;    char *link_info = NULL;    char *sug_filename = NULL;    int lines_in_file = 0;    int pagelen = 0;    int printer_number = 0;    int type = 0;    /*     *	Extract useful info from URL.     */    StrAllocCopy(link_info, newdoc->address+12);    /*     *	Reload the file we want to print into memory.     */    LYpop(newdoc);    WWWDoc.address = newdoc->address;    WWWDoc.post_data = newdoc->post_data;    WWWDoc.post_content_type = newdoc->post_content_type;    WWWDoc.bookmark = newdoc->bookmark;    WWWDoc.isHEAD = newdoc->isHEAD;    WWWDoc.safe = newdoc->safe;    if (!HTLoadAbsolute(&WWWDoc))	return(NOT_FOUND);    /*     *	If we have an explicit content-base, we may use it even     *	if not in source mode. - kw     */    if (HText_getContentBase()) {	StrAllocCopy(content_base, HText_getContentBase());	LYRemoveBlanks(content_base);	if (!(content_base && *content_base)) {	    FREE(content_base);	}    }    /*     *	If document is source, load the content_base     *	and content_location strings. - FM     */    if (HTisDocumentSource()) {	if (HText_getContentLocation()) {	    StrAllocCopy(content_location, HText_getContentLocation());	    LYRemoveBlanks(content_location);	    if (!(content_location && *content_location)) {		FREE(content_location);	    }	}	if (!content_base) {	    if ((content_location) && is_url(content_location)) {		StrAllocCopy(content_base, content_location);	    } else {		StrAllocCopy(content_base, newdoc->address);	    }	}	if (!content_location) {	    StrAllocCopy(content_location, newdoc->address);	}    }    sug_filename = suggested_filename(newdoc);    /*     *	Get the number of lines in the file.     */    if ((cp = (char *)strstr(link_info, "lines=")) != NULL) {	/*	 *  Terminate prev string here.	 */	*cp = '\0';	/*	 *  Number of characters in "lines=".	 */	cp += 6;	lines_in_file = atoi(cp);    }    /*     *	Determine the type.     */    if (strstr(link_info, "LOCAL_FILE")) {	type = TO_FILE;    } else if (strstr(link_info, "TO_SCREEN")) {	type = TO_SCREEN;    } else if (strstr(link_info, "LPANSI")) {	Lpansi = TRUE;	type = TO_SCREEN;    } else if (strstr(link_info, "MAIL_FILE")) {	type = MAIL;    } else if (strstr(link_info, "PRINTER")) {	type = PRINTER;	if ((cp = (char *)strstr(link_info, "number=")) != NULL) {	    /* number of characters in "number=" */	    cp += 7;	    printer_number = atoi(cp);	}	if ((cp = (char *)strstr(link_info, "pagelen=")) != NULL) {	    /* number of characters in "pagelen=" */	    cp += 8;	    pagelen = atoi(cp);	} else {	    /* default to 66 lines */	    pagelen = 66;	}    }    /*     *	Act on the request. - FM     */    switch (type) {	case TO_FILE:	    send_file_to_file(newdoc, content_base, sug_filename);	    break;	case MAIL:	    send_file_to_mail(newdoc, content_base, content_location);	    break;	case TO_SCREEN:	    if (confirm_by_pages(CONFIRM_LONG_SCREEN_PRINT, lines_in_file, LYlines))		send_file_to_screen(newdoc, content_base, Lpansi);	    break;	case PRINTER:	    if (confirm_by_pages(CONFIRM_LONG_PAGE_PRINT, lines_in_file, pagelen))		send_file_to_printer(newdoc, content_base, sug_filename, printer_number);	    break;    } /* end switch */    FREE(link_info);    FREE(sug_filename);    FREE(content_base);    FREE(content_location);    return(NORMAL);}