alias.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <string.h>
#include "wish.h"
#include "token.h"
#include "slk.h"
#include "actrec.h"
#include "ctl.h"
#include "moremacros.h"
#include "sizes.h"
extern int Vflag;
extern char *Aliasfile;
#define MAX_ALIAS 32
static int Num_alias = 0;
static struct pathalias {
char *alias;
char *path;
char *
path_to_full(s)
char *s;
{
int n;
register char *p, *q;
bool b;
struct actrec *a;
extern char *Home, *Filecabinet;
char *expand(), *alias_to_path();
return(strsave(s));
get_aliases();
/* check if a number, if so then path of an open folder */
p = expand(s);
if (*p == '/') /* already a full path */
return(p);
/* check if an alias of another path */
if (q = strchr(p, '/'))
*q = '\0';
return(s);
if (q)
*q = '/'; /* restore p */
if (Vflag) {
/*
* relative to current folder if there is one, else FILECABINET
*/
else
}
else
free(p);
}
static
{
extern char *Home;
if (Vflag) {
}
}
static
char *path;
{
char *p;
char *expand();
return;
*p = '\0';
/* les 12/4
if (Alias[Num_alias].alias)
free(Alias[Num_alias].alias);
*/
Num_alias++;
}
}
}
char *
alias_to_path(s, rest)
char *s;
char *rest;
{
register int i;
for (i = 0; i < Num_alias; i++) {
char *hold;
register char *p;
if (rest) {
}
}
if (rest) {
}
}
}
break;
}
}
return(NULL);
}