Thread View: net.micro.mac
1 messages
1 total messages
Started by Lennart Augustsson
Fri, 25 Jan 1985 05:06
Bundle flag for macput
Author: Lennart Augustsson
Date: Fri, 25 Jan 1985 05:06
Date: Fri, 25 Jan 1985 05:06
123 lines
3877 bytes
3877 bytes
[]
Here's a small fix to macput to enable you to set the
bundle flag when downloading a file. Since the faked info
(macput -r) doesn't contain it normally you have to set it
yourself to get your own icon or whatever. But now just use
macput -r -b.
*** macput.c.old Sat Jan 3 00:59:16 1985
--- macput.c Sat Jan 5 19:39:36 1985
***************
*** 2,8
#include <signal.h>
#include <setjmp.h>
#include <sgtty.h>
! #include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/timeb.h>
--- 2,8 -----
#include <signal.h>
#include <setjmp.h>
#include <sgtty.h>
! #include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/timeb.h>
***************
*** 35,40
/* 65 <-> 80 is the FInfo structure */
#define H_TYPEOFF 65
#define H_AUTHOFF 69
#define H_LOCKOFF 81
#define H_DLENOFF 83
--- 35,42 -----
/* 65 <-> 80 is the FInfo structure */
#define H_TYPEOFF 65
#define H_AUTHOFF 69
+ #define H_FLAGOFF 73
+ #define F_BUNDLE 32
#define H_LOCKOFF 81
#define H_DLENOFF 83
***************
*** 52,57
int mode, txtmode;
int pre_beta; /* -o flag; for compatibility with MacTerminal Version -0.15X */
struct macheader {
char m_name[NAMEBYTES+1];
--- 54,60 -----
int mode, txtmode;
int pre_beta; /* -o flag; for compatibility with MacTerminal Version -0.15X */
+ int bundleflag; /* set bundle flag in faked info */
struct macheader {
char m_name[NAMEBYTES+1];
***************
*** 85,91
* revised ddj 7/31/84 -- fixed timeout problem in initial handshake
*/
char usage[] =
! "usage: \"macput [-o] [-rdu] [-t type] [-a author] [-n name] filename\"\n";
main(ac, av)
char **av;
--- 88,94 -----
* revised ddj 7/31/84 -- fixed timeout problem in initial handshake
*/
char usage[] =
! "usage: \"macput [-o] [-brdu] [-t type] [-a author] [-n name] filename\"\n";
main(ac, av)
char **av;
***************
*** 103,108
while (ac) {
if (av[0][0] == '-') {
switch (av[0][1]) {
case 'r':
mode = RSRC;
strncpy(mh.m_type, "APPL", 4);
--- 106,114 -----
while (ac) {
if (av[0][0] == '-') {
switch (av[0][1]) {
+ case 'b':
+ bundleflag++;
+ break;
case 'r':
mode = RSRC;
strncpy(mh.m_type, "APPL", 4);
***************
*** 262,267
strncpy(buf + H_NAMEOFF, mh.m_name, n);
strncpy(buf + H_TYPEOFF, mh.m_type, 4);
strncpy(buf + H_AUTHOFF, mh.m_author, 4);
if (pre_beta) {
put4(buf + H_OLD_DLENOFF, mh.m_datalen);
put4(buf + H_OLD_RLENOFF, mh.m_rsrclen);
--- 268,275 -----
strncpy(buf + H_NAMEOFF, mh.m_name, n);
strncpy(buf + H_TYPEOFF, mh.m_type, 4);
strncpy(buf + H_AUTHOFF, mh.m_author, 4);
+ if (bundleflag)
+ buf[H_FLAGOFF] |= F_BUNDLE;
if (pre_beta) {
put4(buf + H_OLD_DLENOFF, mh.m_datalen);
put4(buf + H_OLD_RLENOFF, mh.m_rsrclen);
--
Any resemblance of the opinions above to real opinions, living or dead,
is purely coincidential.
Lennart Augustsson
{seismo,philabs,decvax}!mcvax!enea!chalmers!augustss
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads