home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mgr / sparcmgr / demo1.zoo / demo / tests / test_text.c < prev   
Encoding:
C/C++ Source or Header  |  1989-01-24  |  1.3 KB  |  51 lines

  1. /*                        Copyright (c) 1987 Bellcore
  2.  *                            All Rights Reserved
  3.  *       Permission is granted to copy or use this program, EXCEPT that it
  4.  *       may not be sold for profit, the copyright notice must be reproduced
  5.  *       on copies, and credit should be given to Bellcore where it is due.
  6.  *       BELLCORE MAKES NO WARRANTY AND ACCEPTS NO LIABILITY FOR THIS PROGRAM.
  7.  */
  8. /*    $Header: test_text.c,v 4.1 88/06/21 14:02:11 bianchi Exp $
  9.     $Source: /tmp/mgrsrc/demo/tests/RCS/test_text.c,v $
  10. */
  11. static char    RCSid_[] = "$Source: /tmp/mgrsrc/demo/tests/RCS/test_text.c,v $$Revision: 4.1 $";
  12.  
  13. /* test vector drawn text routines */
  14.  
  15. #include "term.h"
  16.  
  17. #define SIZE    500
  18. #define FONTS    5
  19.  
  20. main(argc,argv)
  21. char **argv;
  22.    {
  23.    register int font;
  24.    register int angle;
  25.  
  26.    char buff[256];
  27.  
  28.    if (argc<2) {
  29.       fprintf(stderr,"usage: %s <text>\n",*argv);
  30.       exit(1);   
  31.       }
  32.  
  33.    if (*argv[1] != ' ') {
  34.       strcpy(buff,"  ");
  35.       strcat(buff,argv[1]);
  36.       }
  37.    else
  38.       strcpy(buff,argv[1]);
  39.  
  40.    m_setup(M_DEBUG);
  41.    m_func(B_SET);
  42.    for(font=0;font<FONTS;font++) {
  43.       m_clear();
  44.       for(angle = 0;angle<360;angle +=30)
  45.          text(buff,500,500,font,angle,SIZE/strlen(buff),SIZE/strlen(buff));
  46.       m_flush();
  47.       sleep(3);
  48.       }
  49.    exit(0);
  50.    }
  51.