mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
Remove readline.c
All occurrences of read_line have been replaced by getline. peek_line has been absorbed into detect_brace.
This commit is contained in:
parent
967566e37f
commit
a82b8a3c14
11 changed files with 118 additions and 247 deletions
|
|
@ -13,7 +13,6 @@
|
|||
#include <xkbcommon/xkbcommon-names.h>
|
||||
#include <wlr/types/wlr_keyboard.h>
|
||||
#include "log.h"
|
||||
#include "readline.h"
|
||||
#include "util.h"
|
||||
|
||||
int wrap(int i, int max) {
|
||||
|
|
@ -87,11 +86,12 @@ pid_t get_parent_pid(pid_t child) {
|
|||
char *token = NULL;
|
||||
const char *sep = " ";
|
||||
FILE *stat = NULL;
|
||||
size_t buf_size = 0;
|
||||
|
||||
sprintf(file_name, "/proc/%d/stat", child);
|
||||
|
||||
if ((stat = fopen(file_name, "r"))) {
|
||||
if ((buffer = read_line(stat))) {
|
||||
if (getline(&buffer, &buf_size, stat) != -1) {
|
||||
token = strtok(buffer, sep); // pid
|
||||
token = strtok(NULL, sep); // executable name
|
||||
token = strtok(NULL, sep); // state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue