TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Darin McBride
from: Jim Hansen
date: 1998-09-20 15:11:42
subject: it compiled!

--> Note:
Reply to a message in netmail.

Darin McBride was conversing eloquently to Jim Hansen:

 JH> (Actually, it ran under OS/2 but after adding the first 
 JH> variable input, it terminated with a SIGSEGV.  So now I 
 JH> have to learn debugging. :)

DM> Post the code - we can help.  :-)

Here it is:

/* A small program to print tape lables */

#include 
#include 

void input(int i);
char *in_data[3];
char *out_line[3] = {"Enter Date: ", "Enter Speaker's name:
", "Enter sermon title (without quotes): "};

main()
{
    int count, line_correct, copies;
    FILE *stdprn=fopen("prn","WinTerminate");

    for (count = 0; count < 3; count++)
        input(count);

    do
    {
        printf("\n");
        for (count = 0; count < 3; count++)
            printf("\n %d:  %s", count + 1, *in_data[count]);
        printf("\n");
        puts("Enter line number to correct, or 0 to continue.");
        scanf("%d",&line_correct);
        if (line_correct > 0)
          input(line_correct-1);
    } while (line_correct != 0);

    puts("How many labels do you want printed?  (0 to quit)");
    scanf("%d",&copies);

    for (count = 0; count < copies; count++)
    {
        fprintf(stdprn, "%s\n", *in_data[0]);
        fprintf(stdprn, "%s\n\n\n\n", *in_data[1]);
        fprintf(stdprn, "\"%s\"", *in_data[2]);
    }
     fclose(stdprn);
}

void input(int i)
{
    int malc;
    printf("%s", out_line[i]);
    gets(*in_data);
}
           



'Til next time,
  Jim

--- timEd/2-B10
* Origin: /* CR/2.1 */ Onoway, AB, CAN. 33.6 v34+. 403-967-3664 (1:342/703)
SEEN-BY: 396/1 622/419 632/0 371 633/260 267 270 371 634/397 635/506 728 810
SEEN-BY: 639/252 670/218
@PATH: 342/5014 61 140/1 270/101 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.