elks-enhanced
public
Read
Owner: themaster
Branch: master
Commits: 6893
Updated: 2026-04-19 00:15
Git CLI clone URL
git clone https://www.xt-emporium.com/git/elks-enhanced.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
elks-enhanced
/
elkscmd
/
sh_utils
/
printenv.c
File editor
/* * Copyright (c) 1993 by David I. Bell * Permission is granted to use, distribute, or modify this source, * provided that this copyright notice remains intact. */ #include "shutils.h" #include <unistd.h> int main(int argc, char **argv) { char **env = environ; char *eptr; int len; if (argc == 1) { while (*env) { eptr = *env++; write(STDOUT_FILENO, eptr, strlen(eptr)); write(STDOUT_FILENO, "\n", 1); } return 0; } len = strlen(argv[1]); while (*env) { if ((strlen(*env) > len) && (env[0][len] == '=') && (memcmp(argv[1], *env, len) == 0)) { eptr = &env[0][len+1]; write(STDOUT_FILENO, eptr, strlen(eptr)); write(STDOUT_FILENO, "\n", 1); return 0; } env++; } return 0; }
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
master
Visibility
public
Your access
Read
Remote
Configured
File activity
View file history