'notdef' means it's not used, so we remove it
This commit is contained in:
@@ -245,31 +245,7 @@ DoExtension(byte **inbuf, int label, GifState *g)
|
||||
switch (label) {
|
||||
case 0x01: /* Plain Text Extension */
|
||||
str = "Plain Text Extension";
|
||||
#ifdef notdef
|
||||
if (GetDataBlock(inbuf, (unsigned char*) buf, g) == 0)
|
||||
;
|
||||
|
||||
lpos = LM_to_uint(buf[0], buf[1]);
|
||||
tpos = LM_to_uint(buf[2], buf[3]);
|
||||
width = LM_to_uint(buf[4], buf[5]);
|
||||
height = LM_to_uint(buf[6], buf[7]);
|
||||
cellw = buf[8];
|
||||
cellh = buf[9];
|
||||
foreground = buf[10];
|
||||
background = buf[11];
|
||||
|
||||
while (GetDataBlock(inbuf, (unsigned char*) buf, g) != 0) {
|
||||
PPM_ASSIGN(image[ypos][xpos],
|
||||
cmap[CM_RED][v],
|
||||
cmap[CM_GREEN][v],
|
||||
cmap[CM_BLUE][v]);
|
||||
++index;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case 0xff: /* Application Extension */
|
||||
str = "Application Extension";
|
||||
break;
|
||||
|
||||
@@ -624,17 +624,6 @@ donothing(int sig)
|
||||
pam_end(pamh, PAM_ABORT);
|
||||
}
|
||||
|
||||
#ifdef notdef
|
||||
static int intrupt;
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
catch(int sig)
|
||||
{
|
||||
++intrupt;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* *** Bad login logging support ***
|
||||
*/
|
||||
|
||||
@@ -1832,24 +1832,12 @@ extern char * _tt_status_message(Tt_status s);
|
||||
_tt_file_netfile_results *
|
||||
_tt_file_netfile_1 (_tt_file_netfile_args *args, SVCXPRT * /* transp */)
|
||||
{
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG: SERVER: _tt_file_netfile_1: calling _tt_file_netfile(%s)\n",
|
||||
(char *) args->file_or_netfile);
|
||||
#endif
|
||||
|
||||
static _tt_file_netfile_results results;
|
||||
static char * canonical_path;
|
||||
|
||||
// we have a netfilename, get the local file version...
|
||||
canonical_path = _tt_file_netfile(args->file_or_netfile);
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG: SERVER: _tt_file_netfile_1: _tt_file_netfile(%s) returned %s\n",
|
||||
args->file_or_netfile, canonical_path);
|
||||
#endif
|
||||
|
||||
|
||||
if (_tt_pointer_error(canonical_path) != TT_OK) {
|
||||
results.results = TT_DB_ERR_ILLEGAL_FILE;
|
||||
results.result_string = NULL;
|
||||
@@ -1859,11 +1847,6 @@ printf("DEBUG: SERVER: _tt_file_netfile_1: _tt_file_netfile(%s) returned %s\n",
|
||||
}
|
||||
results.tt_status = (int) _tt_pointer_error(canonical_path);
|
||||
|
||||
#ifdef notdef
|
||||
printf("\t results.tt_status == %s\n",
|
||||
_tt_status_message(_tt_pointer_error(canonical_path)));
|
||||
#endif
|
||||
|
||||
return &results;
|
||||
}
|
||||
|
||||
@@ -1873,23 +1856,12 @@ printf("\t results.tt_status == %s\n",
|
||||
_tt_file_netfile_results *
|
||||
_tt_netfile_file_1 (_tt_file_netfile_args *args, SVCXPRT * /* transp */)
|
||||
{
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG: SERVER: _tt_netfile_file_1: calling _tt_netfile_file(%s)\n",
|
||||
(char *) args->file_or_netfile);
|
||||
#endif
|
||||
|
||||
static _tt_file_netfile_results results;
|
||||
static char * canonical_path;
|
||||
|
||||
// we have a netfilename, get the local file version...
|
||||
canonical_path = _tt_netfile_file(args->file_or_netfile);
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG: SERVER: _tt_netfile_file_1: _tt_netfile_file(%s) returned %s\n",
|
||||
args->file_or_netfile, canonical_path);
|
||||
#endif
|
||||
|
||||
if (_tt_pointer_error(canonical_path) != TT_OK) {
|
||||
results.results = TT_DB_ERR_ILLEGAL_FILE;
|
||||
results.result_string = NULL;
|
||||
@@ -1899,11 +1871,6 @@ printf("DEBUG: SERVER: _tt_netfile_file_1: _tt_netfile_file(%s) returned %s\n",
|
||||
}
|
||||
results.tt_status = (int) _tt_pointer_error(canonical_path);
|
||||
|
||||
#ifdef notdef
|
||||
printf("\t results.tt_status == %s\n",
|
||||
_tt_status_message(_tt_pointer_error(canonical_path)));
|
||||
#endif
|
||||
|
||||
return &results;
|
||||
}
|
||||
|
||||
|
||||
@@ -170,10 +170,6 @@ _tt_host_file_netfile(const char * host, const char * filename)
|
||||
_Tt_host_equiv_ptr eq_p = new _Tt_host_equiv;
|
||||
|
||||
if (eq_p->hostname_equiv(hostname, local_host) == 1) {
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_host_file_netfile: resolving locally.\n");
|
||||
#endif
|
||||
|
||||
// strdup already done in _tt_netfile_file()
|
||||
return _tt_file_netfile(filename);
|
||||
}
|
||||
@@ -234,10 +230,6 @@ _tt_host_netfile_file(const char * host, const char * netfilename)
|
||||
_Tt_host_equiv_ptr eq_p = new _Tt_host_equiv;
|
||||
|
||||
if (eq_p->hostname_equiv(hostname, local_host) == 1) {
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_host_netfile_file: resolving locally.\n");
|
||||
#endif
|
||||
|
||||
// strdup already done in _tt_netfile_file()
|
||||
return _tt_netfile_file(netfilename);
|
||||
}
|
||||
@@ -385,11 +377,6 @@ set_filename(const _Tt_string & filename)
|
||||
// Now get the network path of the file.
|
||||
tmp_string = _tt_local_network_path(absolute_path);
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG set_filename: _tt_local_network_path(%s) returned %s\n",
|
||||
(char *) absolute_path, (char *) tmp_string);
|
||||
#endif
|
||||
|
||||
_lpath = absolute_path; // what we know the file as.
|
||||
|
||||
// load hostname and rpath simultaneously
|
||||
@@ -409,10 +396,6 @@ printf("DEBUG set_filename: _tt_local_network_path(%s) returned %s\n",
|
||||
|
||||
_canonical_path = _canonical_path.cat(_hostname).cat(_rpath).cat(_lpath);
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG set_filename: _canonical_path == %s\n", (char *) _canonical_path);
|
||||
#endif
|
||||
|
||||
return _canonical_path;
|
||||
}
|
||||
|
||||
@@ -465,27 +448,14 @@ parse_netfilename(const _Tt_string & canonical_name)
|
||||
|
||||
_canonical_path = canonical_name;
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG parse_netfilename: _canonical_path == %s\n", (char *) _canonical_path);
|
||||
#endif
|
||||
|
||||
tmp_string = _canonical_path.split(':', dummy);
|
||||
|
||||
_hostname = tmp_string.mid(h_begin, h_end - h_begin + 1);
|
||||
|
||||
_rpath = tmp_string.mid(r_begin, r_end - r_begin + 1);
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG parse_netfilename: _rpath == %s\n", (char *) _rpath);
|
||||
#endif
|
||||
|
||||
_lpath = tmp_string.mid(l_begin, l_end - l_begin + 1);
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG parse_netfilename: _lpath == %s\n", (char *) _lpath);
|
||||
#endif
|
||||
|
||||
|
||||
return _canonical_path;
|
||||
}
|
||||
|
||||
|
||||
@@ -303,11 +303,6 @@ _Tt_db_results _Tt_db_client::connectToDB (const _Tt_string &hostname)
|
||||
void _Tt_db_client::
|
||||
SetError(enum clnt_stat cf_stat)
|
||||
{
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG _Tt_db_client::SetError() -- cf_stat == %d\n", cf_stat);
|
||||
#endif /* notdef */
|
||||
|
||||
switch (cf_stat) {
|
||||
case RPC_PROGNOTREGISTERED:
|
||||
case RPC_AUTHERROR:
|
||||
|
||||
@@ -371,29 +371,14 @@ findMountEntry (const _Tt_string &network_path)
|
||||
while (entries_cursor.next()) {
|
||||
current_hostname = entries_cursor->getHostname();
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG findMountEntry: hostname = %s, current_hostname = %s\n",
|
||||
(char *) hostname, (char *) current_hostname);
|
||||
#endif
|
||||
|
||||
if (eq_p->hostname_equiv(hostname, current_hostname) == 1) {
|
||||
current_partition = entries_cursor->getPartition();
|
||||
current_partition_length = current_partition.len();
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG findMountEntry: found hostname equivalence between %s and %s\n",
|
||||
(char *) hostname, (char *) current_hostname);
|
||||
#endif
|
||||
|
||||
if (path_length >= current_partition_length) {
|
||||
if (!memcmp((char *)path, (char *)current_partition,
|
||||
current_partition_length)) {
|
||||
entry = *entries_cursor;
|
||||
#ifdef notdef
|
||||
printf("DEBUG findMountEntry: found PATH equivalence between %s and %s\n",
|
||||
(char *) hostname, (char *) current_hostname);
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,11 +108,6 @@ prefix_host(const _Tt_string & host, const _Tt_string & localhost)
|
||||
_Tt_string h_prefix = host, l_prefix = localhost,
|
||||
h, l, rpart_host, rpart_localhost;
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG prefix_host: host = %s, localhost = %s\n",
|
||||
(char *) host, (char *) localhost);
|
||||
#endif
|
||||
|
||||
while (rpart_host == rpart_localhost) {
|
||||
h = h_prefix;
|
||||
l = l_prefix;
|
||||
@@ -126,9 +121,6 @@ printf("DEBUG prefix_host: host = %s, localhost = %s\n",
|
||||
rpart_localhost = l.split(j, l_prefix);
|
||||
}
|
||||
|
||||
#ifdef notdef
|
||||
printf("DEBUG prefix_host: returning %s\n", (char *) h);
|
||||
#endif
|
||||
return h;
|
||||
}
|
||||
|
||||
@@ -142,9 +134,6 @@ hostname_equiv(const _Tt_string & host1, const _Tt_string & host2)
|
||||
{
|
||||
// First try a simple comparison.
|
||||
if (host1 == host2) {
|
||||
#ifdef notdef
|
||||
printf("DEBUG hostname_equiv: host1 == host2, returning 1\n");
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -194,10 +183,6 @@ printf("DEBUG hostname_equiv: host1 == host2, returning 1\n");
|
||||
// so do just one comparison.
|
||||
|
||||
if (short_tmp != long_prefix) {
|
||||
#ifdef notdef
|
||||
printf("DEBUG hostname_equiv: short_tmp %s != long_prefix %s, returning 0\n",
|
||||
(char *) short_tmp, (char *) long_prefix);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
is_found = 1;
|
||||
@@ -205,18 +190,11 @@ printf("DEBUG hostname_equiv: short_tmp %s != long_prefix %s, returning 0\n",
|
||||
}
|
||||
|
||||
if (short_prefix != long_prefix) {
|
||||
#ifdef notdef
|
||||
printf("DEBUG hostname_equiv: short_prefix %s != long_prefix %s, returning 0\n",
|
||||
(char *) short_prefix, (char *) long_prefix);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_found != 1) {
|
||||
#ifdef notdef
|
||||
printf("DEBUG hostname_equiv: is_found != 1, returning 0\n");
|
||||
#endif
|
||||
return 0; // no prefix was found
|
||||
}
|
||||
|
||||
@@ -239,9 +217,6 @@ printf("DEBUG hostname_equiv: is_found != 1, returning 0\n");
|
||||
if (_cache_it(sh, shorthost) == 1) {
|
||||
_cache_table->insert(sh);
|
||||
} else {
|
||||
#ifdef notdef
|
||||
printf("DEBUG hostname_equiv: sh.is_null(): returning 0\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -253,9 +228,6 @@ printf("DEBUG hostname_equiv: sh.is_null(): returning 0\n");
|
||||
if (_cache_it(lh, longhost) == 1) {
|
||||
_cache_table->insert(lh);
|
||||
} else {
|
||||
#ifdef notdef
|
||||
printf("DEBUG hostname_equiv: lh.is_null(): returning 0\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -266,10 +238,6 @@ printf("DEBUG hostname_equiv: lh.is_null(): returning 0\n");
|
||||
// This will probably never happen but why
|
||||
// not be careful?
|
||||
if (sh->addr_length != lh->addr_length) {
|
||||
#ifdef notdef
|
||||
printf("DEBUG hostname_equiv: sh->addr_length %d != h->addr_length %d, returning 0\n",
|
||||
sh->addr_length, lh->addr_length);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -278,17 +246,10 @@ printf("DEBUG hostname_equiv: sh->addr_length %d != h->addr_length %d, returning
|
||||
|
||||
while (sh_c.next()) {
|
||||
while (lh_c.next()) {
|
||||
#ifdef notdef
|
||||
printf("DEBUG hostname_equiv: checking address at 0x%x w/ 0x%x\n",
|
||||
(char *) *sh_c, (char *) *lh_c);
|
||||
#endif
|
||||
// Do the IP addresses match?
|
||||
if (memcmp((char *) *sh_c, (char *) *lh_c,
|
||||
sh->addr_length) == 0) {
|
||||
// success!
|
||||
#ifdef notdef
|
||||
printf("DEBUG hostname_equiv: found match!\n");
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,90 +258,42 @@ _Tt_string _tt_local_network_path(const _Tt_string &path)
|
||||
|
||||
if (path.len()) {
|
||||
_Tt_string real_path = _tt_realpath(path);
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_local_network_path: real_path initialized to %s\n",
|
||||
(char *) real_path);
|
||||
#endif
|
||||
_Tt_file_system file_system;
|
||||
_Tt_file_system_entry_ptr entry =
|
||||
file_system.bestMatchToPath(real_path);
|
||||
|
||||
_Tt_string hostname = entry->getHostname();
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_local_network_path: hostname = %s\n",
|
||||
(char *) hostname);
|
||||
#endif
|
||||
_Tt_string loop_back_mount_point =
|
||||
entry->getLoopBackMountPoint();
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_local_network_path: loop_back_mount_point = %s\n",
|
||||
(char *) loop_back_mount_point == NULL ? "(null)" : (char *) loop_back_mount_point);
|
||||
#endif
|
||||
_Tt_string mount_point;
|
||||
if (loop_back_mount_point.len() > 0) {
|
||||
mount_point = loop_back_mount_point;
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_local_network_path: ! isLocal 1: mount_point = %s\n",
|
||||
(char *) mount_point);
|
||||
#endif
|
||||
} else {
|
||||
mount_point = entry->getMountPoint();
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_local_network_path: ! isLocal 2: mount_point = %s\n",
|
||||
(char *) mount_point);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (entry->isLocal()) {
|
||||
if (loop_back_mount_point.len() > 0) {
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_local_network_path: isLocal 2: mount_point = %s\n",
|
||||
(char *) mount_point);
|
||||
#endif
|
||||
// Get the path info after the loop back
|
||||
// mount point path.
|
||||
real_path = real_path.right(real_path.len() -
|
||||
mount_point.len());
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_local_network_path: isLocal 2: real_path = %s\n",
|
||||
(char *) real_path);
|
||||
#endif
|
||||
// Replace the loop back mount point path
|
||||
// with the mount point path.
|
||||
if (mount_point != "/") {
|
||||
real_path = mount_point.cat(real_path);
|
||||
}
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_local_network_path: isLocal 3: real_path = %s\n",
|
||||
(char *) real_path);
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
_Tt_string partition = entry->getPartition();
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_local_network_path: ! isLocal: partition = %s\n",
|
||||
(char *) partition);
|
||||
#endif
|
||||
// Get the path info after the mount point path
|
||||
real_path =
|
||||
real_path.right(real_path.len()-mount_point.len());
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_local_network_path: ! isLocal: real_path = %s\n",
|
||||
(char *) real_path);
|
||||
#endif
|
||||
// Replace the mount point path with the exported
|
||||
// partition path.
|
||||
real_path = partition.cat(real_path);
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_local_network_path: ! isLocal: real_path = %s\n",
|
||||
(char *) real_path);
|
||||
#endif
|
||||
}
|
||||
network_path = hostname.cat(":").cat(real_path);
|
||||
#ifdef notdef
|
||||
printf("DEBUG _tt_local_network_path: network_path = %s\n",
|
||||
(char *) network_path);
|
||||
#endif
|
||||
}
|
||||
|
||||
return network_path;
|
||||
|
||||
Reference in New Issue
Block a user