Cleanups; remove write-out
This commit is contained in:
parent
f97222ff03
commit
cf5e6ea3be
@ -22,14 +22,7 @@
|
||||
#include <toaru/decorations.h>
|
||||
#include <toaru/menu.h>
|
||||
|
||||
#define DIRECT_OFFSET(x,y) ((x) + (y) * window->width)
|
||||
|
||||
/*
|
||||
* Macros make verything easier.
|
||||
*/
|
||||
#define SPRITE(sprite,x,y) sprite->bitmap[sprite->width * (y) + (x)]
|
||||
|
||||
#define GFX_(xpt, ypt) ((uint32_t *)window->buffer)[DIRECT_OFFSET(xpt+decor_left_width,ypt+decor_top_height)]
|
||||
#define GFX_(xpt, ypt) (GFX(ctx,xpt+decor_left_width,ypt+decor_top_height))
|
||||
|
||||
/* Pointer to graphics memory */
|
||||
static yutani_t * yctx;
|
||||
|
11
apps/panel.c
11
apps/panel.c
@ -3,15 +3,11 @@
|
||||
* of the NCSA / University of Illinois License - see LICENSE.md
|
||||
* Copyright (C) 2013-2018 K. Lange
|
||||
*
|
||||
*
|
||||
* Yutani Panel
|
||||
*
|
||||
* Provides a window list and clock as well some simple session management.
|
||||
*
|
||||
* Future goals:
|
||||
* - Applications menu
|
||||
* - More session management
|
||||
* - Pluggable indicators
|
||||
* Provides an applications menu, a window list, status widgets,
|
||||
* and a clock, manages the user session, and provides alt-tab
|
||||
* window switching and alt-f2 app runner.
|
||||
*
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
@ -815,7 +811,6 @@ static void redraw(void) {
|
||||
|
||||
/* Draw each widget */
|
||||
/* - Volume */
|
||||
/* TODO: Get actual volume levels, and cache them somewhere */
|
||||
int widget = 0;
|
||||
if (widgets_network_enabled) {
|
||||
uint32_t color = (netstat && netstat->window) ? HILIGHT_COLOR : ICON_COLOR;
|
||||
|
@ -18,15 +18,6 @@
|
||||
#include <toaru/decorations.h>
|
||||
#include <toaru/sdf.h>
|
||||
|
||||
#define DIRECT_OFFSET(x,y) ((x) + (y) * window->width)
|
||||
|
||||
/*
|
||||
* Macros make verything easier.
|
||||
*/
|
||||
#define SPRITE(sprite,x,y) sprite->bitmap[sprite->width * (y) + (x)]
|
||||
|
||||
#define GFX_(xpt, ypt) ((uint32_t *)window->buffer)[DIRECT_OFFSET(xpt+decor_left_width,ypt+decor_top_height)]
|
||||
|
||||
/* Pointer to graphics memory */
|
||||
static yutani_t * yctx;
|
||||
static yutani_window_t * window = NULL;
|
||||
|
@ -1,25 +0,0 @@
|
||||
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
||||
* This file is part of ToaruOS and is released under the terms
|
||||
* of the NCSA / University of Illinois License - see LICENSE.md
|
||||
* Copyright (C) 2018 K. Lange
|
||||
*
|
||||
* write-out - write stdin into stdout until eof
|
||||
*
|
||||
* Not really necessary any more. This existed before the shell
|
||||
* had support for >output.
|
||||
*/
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
int fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
||||
|
||||
while (1) {
|
||||
char buf[1024];
|
||||
size_t r = read(0, buf, 1024);
|
||||
if (r == 0) break;
|
||||
write(fd, buf, r);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user