473,326 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Re: C and faxes

On Sun, 02 Nov 2008 20:09:29 -0600, Jack Klein wrote:
On Sat, 1 Nov 2008 20:37:24 -0700, George <ge****@example.invalid>
wrote in comp.lang.c:

[slightly re-ordered]
>Grateful for any hints,

Perhaps you should visit the C Unleashed page on my web site:

http://jk-technology.com/C_Unleashed/code_list.html
I'm only half done with it. That you credit only jaysome with correcting
your Hamming code is your choice. No single entity *can* in a lot of ways.
In some sense, every value is triangulated by concurrent errors.
>
One of the source files linked is:

"text2bin.c 240,894 This program generates binary pixel image files,
suitable for encoding by encode.c, from ASCII text files (see
Chap18.txt for more information). Note size, contains large character
generator arrays!"

The next one you want to look at is:

"lj300.c 3,213 This program will generate files for an HP
LaserJet or compatible printer to output the images from encode.c,
decode.c, and test2bin.c (see Chap18.txt for more information)"

I've got these both on disc and a couple tricks up my sleeve here.
>
In fact, I used these two programs extensively in testing the T4
encoding and decoding programs. I generated image files with
text2bin, and used lj300 to generate files I could send to the
printer. Then I encoded and decoded them, and printed them to make
sure I got back the same thing I put in.

If your printer has PCL emulation, and many do, you should be able to
use lj300. If not, you should be able to get information on your
printer and use lj300.c as a starting point for a program to generate
binary files suitable for your printer.

As for sending the PCL 300 DPI image to the printer, I was running
Win98 SE in those days, and my Laser Jet 4 was attached to a parallel
printer port. The command line:

"copy /b filename.ext lpt1"

...worked just fine.

Of course, the Laser Jet and the computer that used to run Windows 98
have long ago been recycled.
Thanks, Jack. Right off the bat that dos command needs updating with my
setup. Keith has posted an ng before that could address it: comp.os -
ms-dos.progammer.something ?
Good luck with your project.
What I'm struggling with now is my C setup. I've taken steps to enter
gcc's mailing list, but I want a c compiler when I stumble home from the
pub tonight.

I get gcc to execute, but gcc can't find the headers when these are my
compiler complaints and configuration:

C:\Program Files\gfortran\source>gcc -o out text2bin.c
text2bin.c:33:19: error: stdio.h: No such file or directory
text2bin.c:34:20: error: stdlib.h: No such file or directory
text2bin.c:35:20: error: string.h: No such file or directory
text2bin.c: In function 'main':
text2bin.c:4957: error: 'FILE' undeclared (first use in this function)
text2bin.c:4957: error: (Each undeclared identifier is reported only once
text2bin.c:4957: error: for each function it appears in.)
text2bin.c:4957: error: 'input' undeclared (first use in this function)
text2bin.c:4958: error: 'output' undeclared (first use in this function)
text2bin.c:4983: error: 'stderr' undeclared (first use in this function)
text2bin.c:4984: error: 'EXIT_FAILURE' undeclared (first use in this
function)
text2bin.c:4986: error: 'NULL' undeclared (first use in this function)
text2bin.c:4988: warning: incompatible implicit declaration of built-in
function
'fprintf'
text2bin.c:4993: warning: incompatible implicit declaration of built-in
function
'fprintf'
text2bin.c:4999: warning: incompatible implicit declaration of built-in
function
'fprintf'
text2bin.c:5012: warning: incompatible implicit declaration of built-in
function
'memset'
text2bin.c:5026: warning: incompatible implicit declaration of built-in
function
'strchr'
text2bin.c:5039: warning: incompatible implicit declaration of built-in
function
'fwrite'
text2bin.c:5051: warning: incompatible implicit declaration of built-in
function
'printf'
text2bin.c:5052: error: 'EXIT_SUCCESS' undeclared (first use in this
function)

C:\Program Files\gfortran\source>cd ..

C:\Program Files\gfortran>dir
Volume in drive C has no label.
Volume Serial Number is 942A-AD55

Directory of C:\Program Files\gfortran

11/03/2008 01:09 PM <DIR .
11/03/2008 01:09 PM <DIR ..
11/03/2008 01:08 PM <DIR bin
11/03/2008 01:08 PM <DIR doc
06/03/2008 04:11 PM 35,819 GPL.txt
11/03/2008 01:08 PM <DIR include
11/03/2008 01:08 PM <DIR lib
11/03/2008 01:08 PM <DIR libexec
11/05/2007 04:37 PM 1,315 perl3.lnk
06/03/2008 04:11 PM 4,845 README.html
11/03/2008 01:12 PM <DIR source
11/03/2008 01:08 PM 34,851 uninstaller.exe
4 File(s) 76,830 bytes
8 Dir(s) 75,307,155,456 bytes free

C:\Program Files\gfortran>

Good grief. How can dos find gcc and gcc not find stdio.h?
--
George

Freedom itself was attacked this morning by a faceless coward, and freedom
will be defended.
George W. Bush

Picture of the Day http://apod.nasa.gov/apod/
Nov 4 '08 #1
0 1378

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Zoury | last post by:
Hi folks! :O) 1. as any one tried something like this and got it to work properly ? only a sample on how it should work, given the few samples i found on the web : '*** Dim mm As MailMessage...
5
by: Ed | last post by:
Hi there, I have a very specific problem and hopefully there is a solution out there for me. I have a folder with thousands of Excel documents. Each of these documents has a header with the...
5
by: Benny | last post by:
Hi, Is there a script/compoenent which can capture Faxes and store that in a DB using a unique ID? Any help will be greatly appriciated. Thanks, Benny
4
by: Andy Rigby | last post by:
I'm setting up a small network of 3 WinXp Pro machines and a shared Access database. I need to be able to send faxes from the copy of Access that's running on any of the machines, using VBA. ...
0
by: Wake-up-Jeff | last post by:
I really like the "Printers & Faxes" GUI in XP. Particularly the LHS - Printer Tasks, See Also, Other Places, Details, etc. Are there a set of controls which can be used to produce a similar look...
1
by: Bill Nguyen | last post by:
I installed Window Faxserver on a Win 2003. I'm looking for sample source codes to send/receive faxes programmatically in VB.NET Thanks Bill
1
by: need2know | last post by:
I've heard that it is possible to send a fax from your pc via a regular fax machine. Is it true? How would that work though? Just wondering. Wondering as well, i know XP comes with an option to...
1
by: =?Utf-8?B?Wm9vbWllNzM3?= | last post by:
Anytime I try to print from any program, the program becomes unresponsive. I can close out the program and try again with the same results. When I open control panel, and select printers and...
5
by: George | last post by:
On Sun, 02 Nov 2008 20:09:29 -0600, Jack Klein wrote: I've gotten farther on this, now that I have a C compiler and have had time to get my head around the T.4 encoding. What I don't see now...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.