Skip to content

Commit

Permalink
Create global root prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
niclas committed Aug 23, 2018
1 parent 5b0eb9b commit 9f32f32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
#define MAXPATH 4096 /* max total pathname length */
#define NCOLS 5 /* default number of columns in display */

char* root_prefix = "[root]";

/* What we IMPORT from xwin.c */
extern int xsetup(), xmainloop(), xdrawrect(), xrepaint();

Expand Down Expand Up @@ -223,7 +225,7 @@ int main(argc, argv)
int argc;
char **argv;
{
top.name = strdup("[root]");
top.name = root_prefix;
top.size = -1;

xsetup(&argc, argv);
Expand Down Expand Up @@ -708,7 +710,7 @@ void printpath(int x, int y)
np = np->parent;
free(tmp_path);
}
tmp_path = path + 6;
tmp_path = path + strlen(root_prefix);
printf("%s\n", tmp_path);
free(path);
}
Expand Down

0 comments on commit 9f32f32

Please sign in to comment.