Compare commits
No commits in common. "mistress" and "v1.2" have entirely different histories.
1 changed files with 6 additions and 16 deletions
22
kissy.c
22
kissy.c
|
|
@ -25,7 +25,6 @@
|
|||
#include <string.h>
|
||||
#include <pwd.h>
|
||||
#include <stdbool.h>
|
||||
#include <ctype.h>
|
||||
|
||||
// mreowww meow nya :3
|
||||
|
||||
|
|
@ -65,21 +64,12 @@ int main (int argc, char **argv) {
|
|||
char* user = pw2->pw_name;
|
||||
|
||||
// if we have a second argument, set a custom kiss message
|
||||
char kiss[32] = "*mwah*";
|
||||
if (argc >= 3) {
|
||||
int len = strlen(argv[2]);
|
||||
int written_chars = 0;
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (written_chars >= 31) {
|
||||
kiss[31] = '\0';
|
||||
break;
|
||||
};
|
||||
if (iscntrl(argv[2][i])) continue;
|
||||
kiss[i] = argv[2][i];
|
||||
written_chars++;
|
||||
}
|
||||
}
|
||||
|
||||
char* kiss;
|
||||
if (argc >= 3)
|
||||
kiss = argv[2];
|
||||
else
|
||||
kiss = "*mwah*";
|
||||
|
||||
bool kissed = false;
|
||||
// iterate over all files in directory
|
||||
DIR *dir = opendir("/dev/pts");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue