Example #1
0
int main() {
    printf("%c%c\n",1,32);
    print("default", (void *)15616);
    print("font_8x8_bbc_system", &font_8x8_bbc_system);
    print("font_8x8_c64_system", &font_8x8_c64_system);
    getchar();
    printf("%c\n",12);
    print("font_8x8_clairsys", &font_8x8_clairsys);
    print("font_8x8_clairsys_bold", &font_8x8_clairsys_bold);
    print("font_8x8_cpc_system", &font_8x8_c64_system);
    getchar();
    printf("%c\n",12);
    print("font_8x8_vga_rom", &font_8x8_vga_rom);
    print("font_8x8_zx_system", &font_8x8_zx_system);

    getchar();
    printf("%c\n",12);
    printf("%c%c\n",1,64);
    print64("font_4x8_64_minix", &font_4x8_64_minix);
    print64("font_4x8_64_nbot", &font_4x8_64_nbot);
    print64("font_4x8_64_omni1", &font_4x8_64_omni1);
    print64("font_4x8_64_omni2", &font_4x8_64_omni2);
    print64("font_4x8_64_owen", &font_4x8_64_owen);
    getchar();
    printf("%c\n",12);
    print64("font_4x8_80columns", &font_4x8_80columns);
    print64("font_4x8_color80", &font_4x8_color80);
    print64("font_4x8_default", &font_4x8_default);
    print64("font_4x8_highspeed80", &font_4x8_highspeed80);
    print64("font_4x8_screen80", &font_4x8_screen80);
    getchar();

}
Example #2
0
void asksave(void){
	/*
	15 21    84 15
	****************************************************************
	**      You haven't save your contact yet, if you still       **#
	**         exit, you may lost all your changes, Sure?         **#
	****************************************************************#
	**  1. Save & Exit  **  2. Main Menu  **  3. Discard Exit  ** **#
	****************************************************************#
	 ################################################################
	20 21
	*/
	printf(BLUEB);		/* set background blue */
	FFOUT;			/* set display immediately */
	CLEARSCR;			/* paint display blue */
	printf(LOC(15,21));	/* set pointer at 15,21 */
	printf(REDB);		/* set background red */
	print64(28);
	printf(LOC(16,21));
	print64(25);
	printf(LOC(17,21));
	print64(26);
	printf(LOC(18,21));
	print64(28);
	printf(LOC(19,21));
	print64(27);
	printf(LOC(20,21));
	print64(28);
	printf(LOC(21,21));	/* shadow line */
	print64(16);
	printf(LOC(15,85));
	printf(BLUEB" ");	/* fix shadow */
	printf(LOC(19,82));	/* Location of enter */
}
Example #3
0
int main(){
	// Файл, который мы будем криптовать, а потом раскриптовывать
	printf("Введите, пожалуйста, название файла:\n");
	char s[255];
	scanf("%s", &(s[0]));
	// выводим содержимое файла
	printfl(s);
	decript(s, 8, 6, "result.dat");
	printfl("result.dat");
	print64("result.dat");
	decript("result.dat", 6, 8, "rezrez.txt");
	printfl("rezrez.txt");
	return 0;
}
Example #4
0
/*===========================================================================*
 *				driver_open				     *
 *===========================================================================*/
static int driver_open(int which)
{
    /* Perform an open or close operation on the driver. This is
     * unfinished code: we should never be doing a blocking sendrec() to
     * the driver.
     */
    message msg;
    cp_grant_id_t gid;
    struct partition part;
    sector_t sectors;
    int r;

    memset(&msg, 0, sizeof(msg));
    msg.m_type = BDEV_OPEN;
    msg.BDEV_MINOR = driver[which].minor;
    msg.BDEV_ACCESS = R_BIT | W_BIT;
    msg.BDEV_ID = 0;
    r = sendrec(driver[which].endpt, &msg);

    if (r != OK) {
        /* Should we restart the driver now? */
        printf("Filter: driver_open: sendrec returned %d\n", r);

        return RET_REDO;
    }

    if(msg.m_type != BDEV_REPLY || msg.BDEV_STATUS != OK) {
        printf("Filter: driver_open: sendrec returned %d, %d\n",
               msg.m_type, msg.BDEV_STATUS);

        return RET_REDO;
    }

    /* Take the opportunity to retrieve the hard disk size. */
    gid = cpf_grant_direct(driver[which].endpt,
                           (vir_bytes) &part, sizeof(part), CPF_WRITE);
    if(!GRANT_VALID(gid))
        panic("invalid grant: %d", gid);

    memset(&msg, 0, sizeof(msg));
    msg.m_type = BDEV_IOCTL;
    msg.BDEV_MINOR = driver[which].minor;
    msg.BDEV_REQUEST = DIOCGETP;
    msg.BDEV_GRANT = gid;
    msg.BDEV_ID = 0;

    r = sendrec(driver[which].endpt, &msg);

    cpf_revoke(gid);

    if (r != OK || msg.m_type != BDEV_REPLY || msg.BDEV_STATUS != OK) {
        /* Not sure what to do here, either. */
        printf("Filter: ioctl(DIOCGETP) returned (%d, %d)\n",
               r, msg.m_type);

        return RET_REDO;
    }

    if(!size_known) {
        disk_size = part.size;
        size_known = 1;
        sectors = div64u(disk_size, SECTOR_SIZE);
        if(cmp64(mul64u(sectors, SECTOR_SIZE), disk_size)) {
            printf("Filter: partition too large\n");

            return RET_REDO;
        }
#if DEBUG
        printf("Filter: partition size: 0x%s / %lu sectors\n",
               print64(disk_size), sectors);
#endif
    } else {
        if(cmp64(disk_size, part.size)) {
            printf("Filter: partition size mismatch (%s != %s)\n",
                   print64(part.size), print64(disk_size));

            return RET_REDO;
        }
    }

    return OK;
}
Example #5
0
void about(void){
	/*
	11 22
	****************************************************************
	**                           About:                           **#
	****************************************************************#
	**          Thanks for using contacts manage system!          **#
	**                Contacts Manage System V1.00                **#
	**                     Made by Ruilx Alxa                     **#
	**     in Xian University of Posts and Telecommunications     **#
	**                                                            **#
	** Compright (C) 2010-2013 GT-Soft Studio All Rights Reserved **#
	**                                                            **#
	**          Please E-mail bugs to: [email protected]         **#
	**     Please visit our Homepage: http://gtsoft.cwsurf.de     **#
	****************************************************************#
         ################################################################
	23 22
	*/
	printf(BLUEB);		/* set background blue */
	FFOUT;			/* set display immediately */
	CLEARSCR;			/* paint display blue */
	printf(LOC(11,22));	/* set pointer at 11,22 */
	printf(PURPLEB);	/* set background purple */
	print64(11);
	printf(LOC(12,22));
	print64(17);
	printf(LOC(13,22));
	print64(11);
	printf(LOC(14,22));
	print64(18);
	printf(LOC(15,22));
	print64(19);
	printf(LOC(16,22));
	print64(20);
	printf(LOC(17,22));
	print64(21);
	printf(LOC(18,22));
	print64(12);
	printf(LOC(19,22));
	print64(22);
	printf(LOC(20,22));
	print64(12);
	printf(LOC(21,22));
	print64(23);
	printf(LOC(22,22));
	print64(24);
	printf(LOC(23,22));
	print64(11);
	printf(LOC(24,22));	/* shadow line */
	print64(16);
	printf(LOC(11,86));
	printf(BLUEB" ");	/* fix shadow */
	printf(LOC(22,79));	/* Location of enter */
}
Example #6
0
void menu(int mode){
	switch(mode){
		case 2:
	/*
	¨XStart with 8,21 (y,x)                              End with 8,84¨[
	08****************************************************************
	09**********************    MAIN    MENU    **********************#
	10****************************************************************#
	11**                                                            **#
	12**     1. Create a contact (Already Exist)                    **#
	13**     2. List the contact                                    **#
	14**     3. Add a member to the contacts                        **#
	15**     4. Delete a member form the contact                    **#
	16**     5. Find and Edit a member from the contacts            **#
	17**     6: Sort your contacts                                  **#
	18**     7: Statistics                                          **#
	19**     8: Save your contacts                                  **#
	20**     9: Change user password                                **#
	21**     0: Exit                                                **#
	22**                                                            **#
	23****************************************************************#
	24**                                                            **#
	25**    Please select the number or enter underlined letter     **#
	26**                                                            **#
	27****************************************************************#
	   ################################################################
	¨^Start with 27,21                                  End with 27,84¨a
	*/
	printf(BLUEB);		/* set background blue */
	FFOUT;			/* set display immediately */
	CLEARSCR;			/* paint display blue */
	printf(LOC(8,21));	/* set pointer at 8,21 */
	printf(PURPLEB);	/* set background purple */
	printf(CLEAR);		/* set font color to default */
	print64(11);		/* draw line 8 */
	printf(LOC(9,21));
	print64(10);		/* draw line 9 mainmenu */
	printf(LOC(10,21));
	print64(11);		/* draw line 10 */
	printf(LOC(11,21));
	print64(12);
	printf(LOC(12,21));
	print64(1);		/* 1 */
	printf(LOC(13,21));
	print64(2);		/* 2 */
	printf(LOC(14,21));
	print64(3);		/* 3 */
	printf(LOC(15,21));
	print64(4);		/* 4 */
	printf(LOC(16,21));
	print64(5);		/* 5 */
	printf(LOC(17,21));
	print64(6);		/* 6 */
	printf(LOC(18,21));
	print64(7);		/* 7 */
	printf(LOC(19,21));
	print64(8);		/* 8 */
	printf(LOC(20,21));
	print64(9);		/* 9 */
	printf(LOC(21,21));
	print64(0);		/* 0 */
	printf(LOC(22,21));
	print64(12);
	printf(LOC(23,21));
	print64(11);
	printf(LOC(24,21));
	print64(12);
	printf(LOC(25,21));
	print64(13);		/* select */
	printf(LOC(26,21));
	print64(12);
	printf(LOC(27,21));
	print64(11);
	printf(LOC(28,21));	/* shadow line */
	print64(16);
	printf(LOC(8,85));
	printf(BLUEB" ");	/* fix shadow */
	printf(LOC(25,78));	/* Location of enter */
	
		break;
		case 1:
	
	/*
	¨XStart with 12,21 (y,x)                            End with 12,84¨[
	12****************************************************************
	13**********************    MAIN    MENU    **********************#
	14****************************************************************#
	15**                                                            **#
	16**     1. Create a contact (Already Exist)                    **#
	17**     0: Exit                                                **#
	18**                                                            **#
	19****************************************************************#
	20**                                                            **#
	21**    Please select the number or enter underlined letter     **#
	22**                                                            **#
	23****************************************************************#
	   ################################################################
	¨^Start with 23,21                                  End with 23,84¨a
	*/

	printf(BLUEB);		/* set background blue */
	FFOUT;			/* set display immediately */
	CLEARSCR;			/* paint display blue */
	printf(LOC(12,21));	/* set pointer at 12,21 */
	printf(PURPLEB);	/* set background purple */
	printf(CLEAR);		/* set font color default */
	print64(11);		/* draw line 12 */
	printf(LOC(13,21));
	print64(10);		/* draw line 13 mainmenu */
	printf(LOC(14,21));
	print64(11);		/* draw line 14 */
	printf(LOC(15,21));
	print64(12);
	printf(LOC(16,21));
	print64(15);		/* 1 not exist */
	printf(LOC(17,21));
	print64(0);		/* 0 exit */
	printf(LOC(18,21));
	print64(12);
	printf(LOC(19,21));
	print64(11);
	printf(LOC(20,21));
	print64(12);
	printf(LOC(21,21));
	print64(13);		/* select */
	printf(LOC(22,21));
	print64(12);
	printf(LOC(23,21));
	print64(11);
	printf(LOC(24,21));	/* shadow line */
	print64(16);
	printf(LOC(12,85));
	printf(BLUEB" ");	/* fix shadow */
	printf(LOC(21,78));	/* Location of enter */
		break;
	default:
		return;
	}
}